Selecting from a Subquery Fails

Поиск
Список
Период
Сортировка
От Francesco Pari
Тема Selecting from a Subquery Fails
Дата
Msg-id 497A088D.7090906@cidimu.it
обсуждение исходный текст
Ответы Re: Selecting from a Subquery Fails  (Euler Taveira de Oliveira <euler@timbira.com>)
Список 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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #4626: postgresql recovery problem
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: Selecting from a Subquery Fails