Re: tsearch2 queries faster than expected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tsearch2 queries faster than expected
Date: 2004-06-07 00:36:57
Message-ID: 22296.1086568617@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeffrey Melloy <jmelloy(at)visualdistortion(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message felix-lists 2004-06-07 01:12:13 Re: Dropping schemas and "illegal seek" -- MEA CUPLA
Previous Message Jeffrey Melloy 2004-06-06 23:25:42 tsearch2 queries faster than expected