Selecting from a Subquery Fails

From: Francesco Pari <pari(at)cidimu(dot)it>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Selecting from a Subquery Fails
Date: 2009-01-23 18:12:29
Message-ID: 497A088D.7090906@cidimu.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello, i have this big isuue:

i have 2 table referenced by this columns
codiceregistrazione=riferimentoesame;

select tipoesame,count(*) from righeaccettazione,registrazione where
codiceregistrazione=riferimentoesame and validita='VALIDO' and
dataesame between timestamp '2008-01-01 00:00:00' and '2008-12-31
23:58:59' and eseguitonellasegreteria=1 and ticket <> 2 and
repartoprovenienza=81 group by tipoesame order by tipoesame;

this query works fine (4 seconds to run as it is a large data set) and
produces 245 rows of values in 2 columns

if i try

select * from (

select tipoesame,count(*) as tot from righeaccettazione,registrazione
where codiceregistrazione=riferimentoesame and validita='VALIDO' and
dataesame between timestamp '2008-01-01 00:00:00' and '2008-12-31
23:58:59' and eseguitonellasegreteria=1 and ticket <> 2 and
repartoprovenienza=81 group by tipoesame order by tipoesame)

as ciao where ciao.tipoesame=615 ;

The query Hangs ....

can this be a bug or a misconfiguration?

thanks in advance

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2009-01-23 18:22:56 Re: BUG #4626: postgresql recovery problem
Previous Message Steven Mezzadri 2009-01-23 15:29:40 BUG #4626: postgresql recovery problem