goddamnyouryan / coven-api

All the news a programmer needs in once place. http://www.coven.link
8 stars 4 forks source link

Add missing indexes to posts #2

Closed antstorm closed 9 years ago

antstorm commented 9 years ago

I noticed missing indexes on posts and added them:

url — unique index that is used on every post creation, since there's a uniqueness validation :source, :position — when posts are fetch they are sorted by position, and sometimes filtered by source, combined index ensures both requests will use this index

goddamnyouryan commented 9 years ago

Another great one. These both should make things a lot faster. Thank you!

Merged and deployed.