Re: Using IN with subselect - Mailing list pgsql-general

From Dave Smith
Subject Re: Using IN with subselect
Date
Msg-id 1101409781.7960.45.camel@playpen.candata.com
Whole thread Raw
In response to Re: Using IN with subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Using IN with subselect
List pgsql-general
That's what I wanted it to do I just did not understand how to read the
explain. So is it HashAggregate that means this already loaded?

On Thu, 2004-11-25 at 12:57, Tom Lane wrote:
> Dave Smith <dave.smith@candata.com> writes:
> > Well here is explain. I would guess that it is executed each time ..
> > function any different?
>
> > HashAggregate  (cost=288.32..288.32 rows=1 width=32)
> >    ->  Hash IN Join  (cost=288.18..288.31 rows=1 width=32)
> >          ->  Subquery Scan journal_all  (cost=282.36..282.45 rows=2 width=64)
> >          ->  Hash  (cost=5.83..5.83 rows=1 width=13)
> >                ->  Index Scan using glmast_index3 on glmast (cost=0.00..5.83 rows=1 width=13)
>
> No ... this plan says to scan glmast once, load the selected rows into
> an in-memory hash table, then scan journal_all once and probe the hash
> table for matches.  It looks like a pretty decent choice of plan to me.
>
>             regards, tom lane
--
Dave Smith
CANdata Systems Ltd
416-493-9020


pgsql-general by date:

Previous
From: "Julian Scarfe"
Date:
Subject: Re: How can I change a cast from explicit only to implicit?
Next
From: "Fred Fung"
Date:
Subject: What is alias_list_srl() ?