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
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