From: jugnooken <ken@jugnoo.com>
To: pgsql-performance@postgresql.org
Subject: Re: WHERE with ORDER not using the best index
Date: Wed, 29 Jan 2014 17:47:19 -0800 (PST)
Message-ID: <1391046439075-5789624.post@n5.nabble.com> (raw)
In-Reply-To: <9852.1391037355@sss.pgh.pa.us>
References: <1391030357379-5789581.post@n5.nabble.com>
<9852.1391037355@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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....
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: ken@jugnoo.com
Subject: Re: WHERE with ORDER not using the best index
In-Reply-To: <1391046439075-5789624.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox