Re: benchmarking the query planner - Mailing list pgsql-hackers

From Tom Lane
Subject Re: benchmarking the query planner
Date
Msg-id 4313.1228931932@sss.pgh.pa.us
Whole thread Raw
In response to Re: benchmarking the query planner  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: benchmarking the query planner
List pgsql-hackers
"Robert Haas" <robertmhaas@gmail.com> writes:
> On Mon, Dec 8, 2008 at 10:24 AM, Gregory Stark <stark@enterprisedb.com> wrote:
>> I tried a different query, trying to get quadratic growth and again failed. It

> The profiling results I sent the other day show an exactly-linear
> increase in the number of times eqjoinsel invokes FunctionCall2.
> Reading through the the eqjoinsel_inner loop in selfuncs.c beginning
> around line 2042, I think what is happening is this: since the two
> tables are really the same table, nvalues1 and nvalues2 are the same
> array, and therefore contain the same elements in the same order.

Yeah, that would be fast.  To see a quadratic case you need MCV arrays
that have little or no overlap of common values --- then each element of
the first will be compared (in vain) to all or most of the elements in
the second.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Regexps vs. locale
Next
From: Josh Berkus
Date:
Subject: Re: WAL documentation changes