Re: TPC-R benchmarks

From: Oleg Lebedev <oleg(dot)lebedev(at)waterford(dot)org>
To: Josh Berkus <josh(at)agliodbs(dot)com>, "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: TPC-R benchmarks
Date: 2003-10-01 17:59:59
Message-ID: 993DBE5B4D02194382EC8DF8554A52731D7618@postoffice.waterford.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Sure, below is the query. I attached the plan to this posting.

select
nation,
o_year,
sum(amount) as sum_profit
from
(
select
n_name as nation,
extract(year from o_orderdate) as o_year,
l_extendedprice * (1 - l_discount) -
ps_supplycost * l_quantity as amount
from
part,
supplier,
lineitem,
partsupp,
orders,
nation
where
s_suppkey = l_suppkey
and ps_suppkey = l_suppkey
and ps_partkey = l_partkey
and p_partkey = l_partkey
and o_orderkey = l_orderkey
and s_nationkey = n_nationkey
and p_name like '%green%'
) as profit
group by
nation,
o_year
order by
nation,
o_year desc;

-----Original Message-----
From: Josh Berkus [mailto:josh(at)agliodbs(dot)com]
Sent: Wednesday, October 01, 2003 11:42 AM
To: Oleg Lebedev; scott.marlowe
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] TPC-R benchmarks

Oleg,

> The output of the query should contain about 200 rows. So, I guess the

> planer is off assuming that the query should return 1 row.

Oh, also did you post the query before? Can you re-post it with the
planner
results?

--
Josh Berkus
Aglio Database Solutions
San Francisco

*************************************

This e-mail may contain privileged or confidential material intended for the named recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.

*************************************

Attachment Content-Type Size
plan.txt text/text 2.6 KB

Browse pgsql-performance by date

  From Date Subject
Next Message Neil Conway 2003-10-01 18:35:55 Re: Optimizing >= and <= for numbers and dates
Previous Message Dimitri Nagiev 2003-10-01 17:45:29 Re: Optimizing >= and <= for numbers and dates