Re: The nested view from hell - Restricting a subquerry

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: The nested view from hell - Restricting a subquerry
Дата
Msg-id 878x97mip7.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: The nested view from hell - Restricting a subquerry  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-sql
"Gregory Stark" <stark@enterprisedb.com> writes:

> Nis Jørgensen <nis@superlativ.dk> writes:
>
>> 1. Look up all order_ids for which (order_id,my_invoice_id) appear in
>> eg_orders
>>
>> 2. Find all rows (in both branches of the UNION) with these id_s

Oh, did you mean look up the order_ids for which there was at least one record
with the invoice_id specified, then look up all records with those order_ids
regardless of invoice_id?

That would work but as you say it would be hard to tell whether it will be any
faster than just processing all the order_ids.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



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

Предыдущее
От: Nis Jørgensen
Дата:
Сообщение: Re: The nested view from hell - Restricting a subquerry
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Database Synchronization