Re: WHERE with ORDER not using the best index
| От | jugnooken |
|---|---|
| Тема | Re: WHERE with ORDER not using the best index |
| Дата | |
| Msg-id | 1391046439075-5789624.post@n5.nabble.com обсуждение исходный текст |
| Ответ на | Re: WHERE with ORDER not using the best index (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: WHERE with ORDER not using the best index
|
| Список | pgsql-performance |
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.
В списке pgsql-performance по дате отправления: