Hi there, Browsing the activerecord-2.1.0 source code I found the following: case limit when 0..3 "smallint(#{limit})" when 4..8 "int(#{limit})" when 9..20 "bigint(#{limit})" else ''int(11)'' end The mysql adapter of activerecord is now able to use more appropriate data types for integers! Finally! That''s awesome! However, where is the mediumint data type? Numbers with length of 5 and 6 should be stored as a mediumint in order to obtain optimal performance from mysql. Shouldn''t this be fixed somehow? I''m considering applying a patch myself (however, I don''t know how yet), but I thought I''d hear you guys out first... Thanks in advance. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Anyone? Maybe I should post question somewhere else. If you got an idea to where it would be wise to post please let me know. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Better yet: write a patch. I think you can see what to do ;) James On Jun 16, 1:40 pm, Rasmus Nielsen <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Anyone? > > Maybe I should post question somewhere else. If you got an idea to where > it would be wise to post please let me know. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 16 Jun 2008, at 18:40, Rasmus Nielsen wrote:> > Anyone? > > Maybe I should post question somewhere else. If you got an idea to > where > it would be wise to post please let me know.the rubyonrails-core list or the rails-contrib irc channel are good places for questions about the development of rails itself etc.. Fred> > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
James Herdman wrote:> Better yet: write a patch. I think you can see what to do ;) > > James > > On Jun 16, 1:40�pm, Rasmus Nielsen <rails-mailing-l...@andreas-s.net>Consider it done! :) http://rails.lighthouseapp.com/projects/8994/tickets/432-mysql-adapter-with-mediumt-support#ticket-432-1 This is my first open source contribution ever. Woohoo! I wonder if it is any good :) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
May I ask as to what the advantage is of using mediumint''s to just regular ints? Is it disk space or something more sinister? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> May I ask as to what the advantage is of using mediumint''s to just > regular > ints? Is it disk space or something more sinister?Mediumtints requires dramatically less disk space. The main advantage is that this allows mysql to hold more rows in memory which boosts performance. Using the right data types is crucial for larger databases... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---