[PERFORM] WHERE with ORDER not using the best index

2014-01-29 Thread jugnooken
Hello everyone, I've a query that runs on a table with a matching index to its WHERE and ORDER clause. However the planner never uses that index. Is there any reason why it doesn't? Here's the table: db=> \d social_feed_feed_items; Table "public.social_fe

Re: [PERFORM] WHERE with ORDER not using the best index

2014-01-29 Thread jugnooken
Thank you so much for the prompt reply, Tom. The index is actually fairly new - but to be safe I issued REINDEX TABLE so that they are all clean. Here are the sizes of each index right after REINDEX. db=> select pg_size_pretty(pg_relation_size('index_social_feed_feed_items_on_social_feed_id_and_po