LockerProject / Locker

Locker - the "me" platform
http://lockerproject.org/
BSD 3-Clause "New" or "Revised" License
1.07k stars 123 forks source link

don't sort primary key indexed queries #890

Closed quartzjer closed 12 years ago

quartzjer commented 12 years ago

it's a stupid idea

http://stackoverflow.com/questions/8440694/mongodb-not-using-indexes-when-sorting

othiym23 commented 12 years ago

Can you expand on why you think it's stupid? The referenced thread doesn't say it's a bad idea to sort, just that you have to be aware of how sorts & queries will interact with the indexes you have, which is going to be true for pretty much any query optimizer for any DB.

quartzjer commented 12 years ago

What is stupid is that in most of our indexed primary key queries we're passing in an irrelevant sort that is confusing things, I'm cleaning them up this afternoon.

On Wed, Feb 29, 2012 at 3:15 PM, Forrest L Norvell reply@reply.github.com wrote:

Can you expand on why you think it's stupid? The referenced thread doesn't say it's a bad idea to sort, just that you have to be aware of how sorts & queries will interact with the indexes you have, which is going to be true for pretty much any query optimizer for any DB.


Reply to this email directly or view it on GitHub: https://github.com/LockerProject/Locker/issues/890#issuecomment-4246982

quartzjer commented 12 years ago

Fixed in https://github.com/LockerProject/Locker/commit/87d6852032aca2d70565c5d07004c1fdb2982c78