Re: Using the query INTERSECTion

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Using the query INTERSECTion
Дата
Msg-id 20070618172735.GD24080@svana.org
обсуждение исходный текст
Ответ на Using the query INTERSECTion  (Vincenzo Romano <vincenzo.romano@gmail.com>)
Ответы Re: Using the query INTERSECTion  (Vincenzo Romano <vincenzo.romano@gmail.com>)
Список pgsql-general
On Mon, Jun 18, 2007 at 04:10:41PM +0200, Vincenzo Romano wrote:
> Hello everyone.
>
> In order to build some dynamic queries (EXECUTE under PL/PgSQL)
> I'm taking in consideration to use the INTERSECT operator in order
> to split a WHERE-condition in a static one and a dynamic one to be
> built at runtime.

The INTERSECT will almost certainly be slower, basically because all
the joins will have to be processed twice. Also, the results won't be
quite the same, especially with respect to duplicate records and NULLs.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: PFC
Дата:
Сообщение: Re: [pgsql-advocacy] [PERFORM] [ADMIN] Postgres VS Oracle
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [pgsql-advocacy] [PERFORM] [ADMIN] Postgres VS Oracle