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   <[EMAIL PROTECTED]>   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.

Attachment: pgplWWSmVNQJT.pgp
Description: PGP signature

Reply via email to