Re: WHERE with ORDER not using the best index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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_posted_at'));
 pg_size_pretty
----------------
 149 MB
(1 row)

db=> select
pg_size_pretty(pg_relation_size('index_social_feed_feed_items_on_social_feed_id'));
 pg_size_pretty
----------------
 106 MB
(1 row)

Unfortunately, pg still thinks using
index_social_feed_feed_items_on_social_feed_id is faster although they are
about the same size :(. Any idea?

Regards,
Ken



--
View this message in context: http://postgresql.1045698.n5.nabble.com/WHERE-with-ORDER-not-using-the-best-index-tp5789581p5789624.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux