473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

TPC-H Query Results - 1GB DB

Hello,

I am trying to validate all the 22-Queries in the TPC-H Benchmark on
DB2 UDB 8.2, I am having a little bit of trouble with Query #8

The result should be:

YEAR MKT_SHARE
1995 .03
1996 .04

But when I run the query, I got the following result:

YEAR MKT_SHARE
1995 .0
1996 .0

I am not really sure what could be wrong, the query syntax is %100
correct. I would really appreciate any help.

Query #8 :

select
o_year,
sum(case
when nation = 'BRAZIL' then volume
else 0
end) / sum(volume) as mkt_share
from
(
select
year(o_orderdate) as o_year,
l_extendedprice * (1 - l_discount) as volume,
n2.n_name as nation
from
part,
supplier,
lineitem,
orders,
customer,
nation n1,
nation n2,
region
where
p_partkey = l_partkey
and s_suppkey = l_suppkey
and l_orderkey = o_orderkey
and o_custkey = c_custkey
and c_nationkey = n1.n_nationkey
and n1.n_regionkey = r_regionkey
and r_name = 'AMERICA'
and s_nationkey = n2.n_nationkey
and o_orderdate between date('1995-01-01') and date('1996-12-31')
and p_type = 'ECONOMY ANODIZED STEEL'
) as all_nations
group by
o_year
order by
o_year;

Regards,
Salem

Nov 12 '05 #1
3 4202
"UnixSlaxer" <un********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,

I am trying to validate all the 22-Queries in the TPC-H Benchmark on
DB2 UDB 8.2, I am having a little bit of trouble with Query #8

The result should be:

YEAR MKT_SHARE
1995 .03
1996 .04

But when I run the query, I got the following result:

YEAR MKT_SHARE
1995 .0
1996 .0

I am not really sure what could be wrong, the query syntax is %100
correct. I would really appreciate any help.


This is what IBM used in their benchmark (published on the TPC.org site). If
it is not right, then you probably have a data problem as a result of the
compile process of the datagen program:

select
o_year,
sum(case
when nation = 'BRAZIL' then volume
else 0
end) / sum(volume) as mkt_share
from
(
select
year(o_orderdate) as o_year,
l_extendedprice * (1 - l_discount) as volume,
n2.n_name as nation
from
tpcd.part,
tpcd.supplier,
tpcd.lineitem,
tpcd.orders,
tpcd.customer,
tpcd.nation n1,
tpcd.nation n2,
tpcd.region
where
p_partkey = l_partkey
and s_suppkey = l_suppkey
and l_orderkey = o_orderkey
and o_custkey = c_custkey
and c_nationkey = n1.n_nationkey
and n1.n_regionkey = r_regionkey
and r_name = 'AMERICA'
and s_nationkey = n2.n_nationkey
and o_orderdate between date('1995-01-01') and
date ('1996-12-31')
and p_type = 'ECONOMY ANODIZED STEEL'
) as all_nations
group by
o_year
order by
o_year

O_YEAR MKT_SHARE
-----------------------------------
1995 0.034
1996 0.041

Number of rows retrieved is: 2
Nov 12 '05 #2
"UnixSlaxer" <un********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hello,

I am trying to validate all the 22-Queries in the TPC-H Benchmark on
DB2 UDB 8.2,

One more thing. Some of the TPC-H queries will run much faster with query
optimization level set to 7 (default is 5).
Nov 12 '05 #3
Hello,

I Also tried the queries published at TPC.org for IBM DB2, but I had
the same result:

1995 .0
1996 .0

All the other queries are running fine and with the expected results,
except for Query 8, it seems to me it has something to do with
fractions? decimal points? I really don't know.

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark A | last post by:
DB2 UDB V8.2, eServer p595, and TotalStorage FASt900 published an amazing TPC-C result of 3,210,540 tpmC at a price/performance of $5.19/tpmC, demonstrating 2.7x better performance than Oracle RAC....
6
by: O. Kouame | last post by:
Hi all, Does anyone know where I can find an implementation of the TPC-C benchmark for SQL Server 2000 (preferably written in .NET) ? All I can find is an old Microsoft implementation of TPC-B...
3
by: Gaetano Mendola | last post by:
I found this article: http://www.serverwatch.com/news/article.php/10824_1126981_Ext that is clear out dated, it's anyway a good comparison with mysql. Do you know if someone did the TPC-C...
6
by: Shalu Gupta | last post by:
Hello, We are trying to import the TPC-H data into postgresql using the COPY command and for the larger files we get an error due to insufficient memory space. We are using a linux system...
6
by: z | last post by:
How can validation testing on DBMSs such as DB2 and Oracle be performed? Is there a quick commonly used publicly available DBMS test that can be used? Could TPC-C be used? If so, where can...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.