| From: | jugnooken <ken(at)jugnoo(dot)com> | 
|---|---|
| To: | pgsql-performance(at)postgresql(dot)org | 
| Subject: | Re: WHERE with ORDER not using the best index | 
| Date: | 2014-01-30 01:47:19 | 
| Message-ID: | 1391046439075-5789624.post@n5.nabble.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2014-01-30 16:00:41 | Re: WHERE with ORDER not using the best index | 
| Previous Message | Дмитрий Шалашов | 2014-01-30 00:17:23 | Re: trick the query optimiser to skip some optimisations |