Re: problem in select

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: problem in select
Дата
Msg-id Pine.LNX.4.21.0209131757570.619-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на problem in select  ("frank_lupo" <frank_lupo@email.it>)
Список pgsql-general
On Fri, 13 Sep 2002, [utf-8] frank_lupo wrote:

> This selection is more fast in ingres vs postgres
> Ingres 6.4    0.04 sec
> Postgres 7.2  0.42 sec
> select titolo,id,anno from ircalend where anno=2002 and id in(select distinct(idcalend) from ircalend_3) order by
anno,titolo
> because ?

What happens if you do:

SELECT titolo,id.anno
  FROM ircalend
  WHERE
    anno = 2002
   AND
    EXISTS (SELECT 1 FROM ircalend_3 WHERE idcalend = id)
  ORDER BY anno, titolo


Try doing an EXPLAIN ANALYZE on your query as well. That will give you the
execution plan.


--
Nigel J. Andrews


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: problem in select
Следующее
От: frbn
Дата:
Сообщение: Re: pg_dumpall between Linux and FreeBSD.