This project is archived and is in readonly mode.

#1013 ✓committed
RSL

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

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