From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | George <pinkisntwell(at)gmail(dot)com> |
Cc: | Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Index is not used for "IN (non-correlated subquery)" |
Date: | 2016-12-01 17:41:21 |
Message-ID: | 26446.1480614081@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
George <pinkisntwell(at)gmail(dot)com> writes:
> On Thu, Dec 1, 2016 at 6:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> What
>> do you get for
>> select * from pg_stats where tablename = 'wg3ppbm_userpartner';
>> and likewise for wg3ppbm_partner?
> It is a wide table. Do you want me to dump csv here?
Shouldn't be *that* wide, with only one row in the underlying table ;-)
Maybe psql \x format would be suitable.
> In the meantime, with the help of the folks at #postgresql I was able
> to wisen up the query planner by using either one of the following two
> settings:
> SET enable_seqscan = false
> SET cpu_tuple_cost = 0.1
Well, that proves it is considering the indexscan option. But there is
something funny going on, if you have stats for these tables and yet
you're getting a default rowcount estimate.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Benoit Lobréau | 2016-12-01 19:11:06 | [GENERAL] Replication between différent versions of the same OS. |
Previous Message | George | 2016-12-01 17:27:40 | Re: Index is not used for "IN (non-correlated subquery)" |