Re: cannot get stable function to use index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Colson <andy(at)squeakycode(dot)net>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: cannot get stable function to use index
Date: 2015-12-30 19:07:08
Message-ID: 21840.1451502428@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I wrote:
> This says there's only about a 25% runtime penalty for the partial match,
> at least on your example, compared to the planner's estimate of 2700x
> penalty :-(. Definitely need to fix that.

I tried to reproduce this behavior with simple generated data, and could
not: the estimates seem to track the actual cost reasonably well. So
it seems like you've got some weird data statistics that are causing a
misestimate. Could we see the pg_stats row for that tsvector column?
Or maybe even the actual data?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Cory Tucker 2015-12-30 19:09:16 Efficiently Triggering Autovacuum Analyze?
Previous Message Tom Lane 2015-12-30 18:35:47 Re: cannot get stable function to use index