Skip site navigation (1) Skip section navigation (2)

Re: Doubt in index subplan query

From: Decibel! <decibel(at)decibel(dot)org>
To: suiyengar(at)yahoo(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Doubt in index subplan query
Date: 2008-06-20 16:14:47
Message-ID: 790D81E2-3278-415E-89C7-900B9896A708@decibel.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Jun 20, 2008, at 1:11 AM, Suresh wrote:
> I have a query plan for a certain query
>
>  Nested Loop  (cost=100000000.00..38761761090.50 rows=3000608 width=8)
>    ->  Seq Scan on lineitem  (cost=100000000.00..100213649.15  
> rows=6001215 width=8)
>    ->  Index Scan using oindex2 on myorders  (cost=0.00..6442.27  
> rows=1 width=4)
>          Index Cond: ("outer".l_orderkey = myorders.o_orderkey)
>          Filter: (subplan)
>          SubPlan
>            ->  Index Scan using cnation on customer   
> (cost=0.00..12859.39 rows=5251 width=0)
>                  Index Cond: (c_nationkey = 10)
>
> How is the subplan handled by postgres at index level ? Is any sort  
> of hashing done ?

This is better asked on pgsql-general... but the subplan does exactly  
what it says; an index scan. It will be executed for every row of the  
calling query.
-- 
Decibel!, aka Jim C. Nasby, Database Architect  decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828


In response to

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2008-06-20 16:19:03
Subject: Re: ...Roll Back issue in PGSQL..
Previous:From: Decibel!Date: 2008-06-20 16:12:38
Subject: Re: Backend Stats Enhancement Request

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group