Re: Planner selects different execution plans depending on limit

From: Bill Martin <bill(dot)martin(at)communote(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-18 07:28:25
Message-ID: D48BF41C96B16442B542F5E25C259047011E8118EC@COM211.communardo.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-performance

Tom Lane <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> 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

I tried:
ALTER TABLE ft_simple_core_content_content_idx ALTER column to_tsvector SET STATISTICS 10000;
ANALYZE;

and
REINDEX INDEX ft_simple_core_content_content_idx;

All the trouble was for nothing.

Are there any other possibilities to solve my problem?

Best regards,
Bill Martin

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message data tanger 2012-09-18 13:59:53 Issue with SHMALL parameter
Previous Message Tom Lane 2012-09-17 03:58:06 Re: BUG #7543: Invalid table alias: DELETE FROM table *

Browse pgsql-performance by date

  From Date Subject
Next Message Andrea Suisani 2012-09-18 07:44:13 Re: 20% performance drop on PostgreSQL 9.2 from kernel 3.5.3 to 3.6-rc5 on AMD chipsets
Previous Message McKinzie, Alan (Alan) 2012-09-17 13:38:27 Re: Are there known performance issues with defining all Foreign Keys as deferrable initially immediate