Re: tsearch2 queries faster than expected - Mailing list pgsql-general

From Tom Lane
Subject Re: tsearch2 queries faster than expected
Date
Msg-id 22296.1086568617@sss.pgh.pa.us
Whole thread Raw
In response to tsearch2 queries faster than expected  (Jeffrey Melloy <jmelloy@visualdistortion.org>)
List pgsql-general
Jeffrey Melloy <jmelloy@visualdistortion.org> writes:
> The other day I was playiing around with a query, and randomly changed
> a few things.  I noticed a 10 times speedup and didn't know why.  Both
> queries return identical results.

It looks like the planner's overestimate of the number of rows returned
by the function causes it to insert a Materialize step in the inside of
the nestloop join, so as to avoid recomputing the inner scan multiple
times.  Which is a good idea.  I wonder why it didn't do it in both
cases?

            regards, tom lane

pgsql-general by date:

Previous
From: Jeffrey Melloy
Date:
Subject: tsearch2 queries faster than expected
Next
From: Bruno Wolff III
Date:
Subject: Re: COPY error handling