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


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to