| From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
|---|---|
| To: | Nis Jørgensen <nis(at)superlativ(dot)dk> |
| Cc: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: The nested view from hell - Restricting a subquerry |
| Date: | 2007-07-23 12:02:28 |
| Message-ID: | 878x97mip7.fsf@oxford.xeocode.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
"Gregory Stark" <stark(at)enterprisedb(dot)com> writes:
> Nis Jørgensen <nis(at)superlativ(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2007-07-23 18:13:20 | Re: Database Synchronization |
| Previous Message | Nis Jørgensen | 2007-07-23 11:57:11 | Re: The nested view from hell - Restricting a subquerry |