Skip site navigation (1) Skip section navigation (2)

Re: TPC-R benchmarks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
Cc: Jenny Zhang <jenny(at)osdl(dot)org>,"pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: TPC-R benchmarks
Date: 2003-09-26 04:28:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)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

In response to


pgsql-performance by date

Next:From: Shridhar DaithankarDate: 2003-09-26 07:25:15
Subject: Re: Indices arent being used
Previous:From: Josh BerkusDate: 2003-09-26 03:41:15
Subject: Re: TPC-R benchmarks

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group