Ruby on Rails Tuesday, November 27, 2012

I am use ROR v= 2.3.4

in my console.  i found a strange query SELECT * FROM [Primary Key(id)] = 0,
because of i had changed the id[Primary Key] from int to varchar. ruby on rails still query the db on int like 0 use int not '0'.
such kind query cost too much db resource. and i don't konw how to prevent such query.

please help.

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/sIxpnPmE3EEJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment