Re: cannot get stable function to use index - Mailing list pgsql-general

From Tom Lane
Subject Re: cannot get stable function to use index
Date
Msg-id 21840.1451502428@sss.pgh.pa.us
Whole thread Raw
In response to Re: cannot get stable function to use index  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: cannot get stable function to use index  (Andy Colson <andy@squeakycode.net>)
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: cannot get stable function to use index
Next
From: Cory Tucker
Date:
Subject: Efficiently Triggering Autovacuum Analyze?