TPCH questions

Started by Victor Muntes Muteroabout 25 years ago10 messagesgeneral
Jump to latest
#1Victor Muntes Mutero
vmuntes@ac.upc.es

Hello,

we have got a problem when executing some queries of tpch benchmark on
PostgreSQL.

For instance, the postgres parser do not accept the syntax of the query
number 9:

select nation2 , o_year, sum(amount) as sum_profit
from
(
select
n_name as nation2,
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
nation2,
o_year
order by
nation2,
o_year desc;

Postgres returns the following message:

ERROR: parser: parse error at or near "select"

We have tried to solve the problem and we have seen that simplifying,
the real problem shows up when trying to solve a query like this one:

select * from (select * from supplier); (for example)

What's the problem?

We've heard about some variants of TPCH queries, do you know if there is
any of these which could solve our problem?

Thanks in advance,

Victor Muntes
Pep Aguilar

#2Jean-Arthur Silve
jeanarthur@eurovox.fr
In reply to: Victor Muntes Mutero (#1)
what means "INSERT xxx yyy" ?

Hi !

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

I had a problem with a DB because I reached the max transaction ID.

So, how could i know what is the maximum ? and what is the current
transaction ID ?
Is it the first number ?

Thank you

----------------------------------------------------------------
Le simple fait de passer par la fenetre ne suffit pas a la transformer en porte.

#3Richard Huxton
dev@archonet.com
In reply to: Jean-Arthur Silve (#2)
Re: [GENERAL] what means "INSERT xxx yyy" ?

From: "Jean-Arthur Silve" <jeanarthur@eurovox.fr>

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

Sorry - don't know what the first number is - I'm getting 0 here on testing.
The second is the number of rows inserted.

- Richard Huxton

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Victor Muntes Mutero (#1)
Re: TPCH questions

Victor Muntes Mutero <vmuntes@ac.upc.es> writes:

we have got a problem when executing some queries of tpch benchmark on
PostgreSQL.
For instance, the postgres parser do not accept the syntax of the query
number 9:

Subselects in FROM are supported as of 7.1, but not in prior releases.

regards, tom lane

#5mike
matrix@quadrent.net
In reply to: Jean-Arthur Silve (#2)
Re: what means "INSERT xxx yyy" ?

Hi !

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

I had a problem with a DB because I reached the max transaction ID.

So, how could i know what is the maximum ? and what is the current
transaction ID ?
Is it the first number ?

Thank you

INSERT 19331808 1

That just tells you waht you did "INSERT" and it displays the oid for that
insert "19331808", as for the 1, uncertain waht it is, but its always there

Mike

#6(J.H.M. Dassen \(Ray\))
jdassen@cistron.nl
In reply to: Jean-Arthur Silve (#2)
Re: what means "INSERT xxx yyy" ?

mike <matrix@quadrent.net> wrote:

INSERT 19331808 1

That just tells you waht you did "INSERT" and it displays the oid for that
insert "19331808", as for the 1, uncertain waht it is

The number of rows affected, IIRC.

HTH,
Ray
--
These days we're all supposed to believe that everyone's opinion is equally
valid, but sometimes you just have to stand up and say "Your opinion is
wrong, and here is why, in overwhelming detail."
http://www.kuro5hin.org/?op=displaystory;sid=2000/10/1/21448/7653

#7Peter Eisentraut
peter_e@gmx.net
In reply to: Victor Muntes Mutero (#1)
Re: [ADMIN] TPCH questions

Victor Muntes Mutero writes:

select * from (select * from supplier); (for example)

No subselects in FROM before 7.1.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#8Jie Liang
jliang@ipinc.com
In reply to: Richard Huxton (#3)
Re: Re: [GENERAL] what means "INSERT xxx yyy" ?

I believe that first number is oid.

Jie LIANG

St. Bernard Software
Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang@ipinc.com
www.stbernard.com
www.ipinc.com

On Thu, 15 Feb 2001, Richard Huxton wrote:

Show quoted text

From: "Jean-Arthur Silve" <jeanarthur@eurovox.fr>

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

Sorry - don't know what the first number is - I'm getting 0 here on testing.
The second is the number of rows inserted.

- Richard Huxton

#9Gena Gurchonok
gena@rt.mipt.ru
In reply to: Jie Liang (#8)
Re[3]: [GENERAL] what means "INSERT xxx yyy" ?

Hello

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

Sorry - don't know what the first number is - I'm getting 0 here on testing.
The second is the number of rows inserted.

If multiple rows inserted DB cannot show you all oids so it is "0"

Gena

#10Kajetan Kazimierczak
kajetan@wineasy.se
In reply to: mike (#5)
Re: Re: what means "INSERT xxx yyy" ?

mike wrote:

Hi !

Does anyone knows what means, after an INSERT for exemple the message :

INSERT 19331808 1

What the meaning of the two numbers ?

I had a problem with a DB because I reached the max transaction ID.

So, how could i know what is the maximum ? and what is the current
transaction ID ?
Is it the first number ?

Thank you

INSERT 19331808 1

That just tells you waht you did "INSERT" and it displays the oid for that
insert "19331808", as for the 1, uncertain waht it is, but its always there

Mike

The one is the number of records inserted.