

One Weird Trick for a 15,000x Improvement in PostgreSQL Performance - jsomers
http://news.rapgenius.com/Rap-genius-engineering-team-one-weird-trick-for-a-15000x-improvement-in-postgresql-performance-annotated

======
angersock
Oracle hates this guy!

TL,DR:

Using the wrong indices results in really poor performance, especially if you
_sort_ then _filter_.

A classic screw-up along similar lines is "SELECT quote FROM quotes ORDER BY
RAND() LIMIT 1"

