| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Dave Smith <dave(dot)smith(at)candata(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Using IN with subselect |
| Date: | 2004-11-25 17:11:12 |
| Message-ID: | 20041125171111.GB28393@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Running EXPLAIN over the query will tell you...
On Thu, Nov 25, 2004 at 11:49:06AM -0500, Dave Smith wrote:
> I have a query with an in subquery like
>
> where x in (select x from y);
>
> Now the subquery is not related to the outer query so it always returns
> the same set. Is this subselect executed each time or just once? If it
> is executed each time, if I create a function would that then be only
> executed once?
>
> --
> Dave Smith
> CANdata Systems Ltd
> 416-493-9020
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Smith | 2004-11-25 17:19:23 | Re: Using IN with subselect |
| Previous Message | Greg Stark | 2004-11-25 16:57:26 | Re: why use SCHEMA? any real-world examples? |