Re: Planner selects different execution plans depending on limit

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Martin <bill(dot)martin(at)communote(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Planner selects different execution plans depending on limit
Date: 2012-09-13 17:33:19
Message-ID: 16905.1347557599@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-performance

Bill Martin <bill(dot)martin(at)communote(dot)com> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> He can do it without having to change his schema --- but it's the index
>> column, not the underlying content column, that needs its statistics
>> target adjusted.

> How can I adjust the statistics target of the index?

Just pretend it's a table.

ALTER TABLE index_name ALTER COLUMN column_name SET STATISTICS ...

You'll need to look at the index (eg with \d) to see what the name of
the desired column is, since index expressions have system-assigned
column names.

regards, tom lane

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2012-09-13 22:25:07 Re: Details about libpq cross-version compatibility
Previous Message Bill Martin 2012-09-13 17:19:10 Re: Planner selects different execution plans depending on limit

Browse pgsql-performance by date

  From Date Subject
Next Message Ross Reedstrom 2012-09-13 18:11:13 AppScale backend datastore (NoSQL again kind of)
Previous Message Bill Martin 2012-09-13 17:19:10 Re: Planner selects different execution plans depending on limit