Re: Incorrect index being used - Mailing list pgsql-general

From Jesse Long
Subject Re: Incorrect index being used
Date
Msg-id 52565BBB.2070700@iso-8859-1.za.net
Whole thread Raw
In response to Re: Incorrect index being used  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
On 09/10/2013 15:20, Albe Laurenz wrote:
> Jesse Long wrote:
>> There is no problem with row visibility, there is only one connection to
>> the database - the connection I am using to do these selects.
> No idea why the plans cannot be used.
>
> It might be helpful to see the table and index definitions.
>
>> Thanks you for the advise regarding ANALYZE. I ran ANALYZE on both
>> tables concerned, but not much changed:
> Did you try increasing default_statistics_target before ANALYZE?
>
> Yours,
> Laurenz Albe
>

Hi Laurenz,

After running VACUUM ANALYZE, the query did run the preferred sub plan,
at least once. This was before making any changes.

I did ALTER COLUMN SET STATISTICS 10000 for each column involved after
that (is that what you meant?). But it did not make much difference, but
I have read the manual regarding this setting and think I understand it.

Would it be a bad idea to ALTER COLUMN SET STATISTICS 100000? Would that
have a very negative impact on disk usage or performace?

Thanks,
Jesse






pgsql-general by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: streaming replication timeout error
Next
From: Jesse Long
Date:
Subject: Re: Incorrect index being used