Re: TPC-R benchmarks - Mailing list pgsql-performance

From Tom Lane
Subject Re: TPC-R benchmarks
Date
Msg-id 8486.1064550534@sss.pgh.pa.us
Whole thread Raw
In response to Re: TPC-R benchmarks  (Oleg Lebedev <oleg.lebedev@waterford.org>)
Responses Re: TPC-R benchmarks
List pgsql-performance
Oleg Lebedev <oleg.lebedev@waterford.org> writes:
> Seems like in your case postgres uses an i_l_partkey index on lineitem
> table. I have a foreign key constraint defined between the lineitem and
> part table, but didn't create an special indexes. Here is my query plan:

The planner is obviously unhappy with this plan (note the large cost
numbers), but it can't find a way to do better.  An index on
lineitem.l_partkey would help, I think.

The whole query seems like it's written in a very inefficient fashion;
couldn't the estimation of '0.2 * avg(l_quantity)' be amortized across
multiple join rows?  But I dunno whether the TPC rules allow for
significant manual rewriting of the given query.

            regards, tom lane

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: TPC-R benchmarks
Next
From: Shridhar Daithankar
Date:
Subject: Re: Indices arent being used