This project is archived and is in readonly mode.
make association preloading use = instead of IN for single records
Reported by RSL | September 10th, 2008 @ 07:29 PM | in 2.1.2
i noticed that rails sometimes hits the db twice for the same single record like so:
SELECT * FROM `sites` WHERE (`sites`.`id` IN (1))
SELECT * FROM `sites` WHERE (`sites`.`id` = 1)
this patch fixes this.
Comments and changes to this ticket
-
Jeremy Kemper September 10th, 2008 @ 10:10 PM
- State changed from new to open
- Milestone changed from 2.x to 2.1.2
-
Repository September 10th, 2008 @ 10:14 PM
- State changed from open to committed
(from [ba342c2c96999d207012140b34f95fc553b3d447]) fixed association preloading to use = instead of IN when there's only one record
[#1013 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
-
Repository September 10th, 2008 @ 10:14 PM
(from [6ce13429cbc1359d85e1dc99c84561840e89d455]) fixed association preloading to use = instead of IN when there's only one record
[#1013 state:committed]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1013 make association preloading use = instead of IN for single records [#1013 state:committed]
- 1013 make association preloading use = instead of IN for single records [#1013 state:committed]