Doubt in index scan code
От | Suresh |
---|---|
Тема | Doubt in index scan code |
Дата | |
Msg-id | 597790.92025.qm@web54504.mail.re2.yahoo.com обсуждение исходный текст |
Ответ на | Re: Doubt in heap_release_fetch (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Doubt in index scan code
|
Список | pgsql-hackers |
Hello all,<br /><br />I have a custom code written inside postgres in an application we use.<br />The snippet is as below:<br />Here inner plan is an index scan.<br /><br /> scandesc = ((IndexScanState *)innerPlan)->iss_ScanDesc; <br/><br /> flag=index_getmulti(scandesc, &tidelm->tid, 1, &ret_tids);<br /><br />Now consider a query like<br/><br />explain select * from dept,manager where did=id ;<br /> QUERY PLAN <br />---------------------------------------------------------------------------<br/> Nested Loop (cost=0.00..269.09 rows=45width=72)<br /> -> seq scan on manager (cost=0.00..6.50 rows=45 width=36)<br /> -> Index Scan using id1on dept (cost=0.00..5.82 rows=1 width=36)<br /> Index Cond: ("outer".did = dept.id)<br /><br />Say seq scan retrievesdid in the order 30,10, 20.. My doubt is in what order <br />will index_getmulti return tids. How does the scandescwork ? <br /><br />Will it return the tids as firstly macthing inners for dept=30, then dept=10 ?<br /><br />Pleasehelp me with this.<br /><br />Thanks and regards,<br />Suresh<br /><br /><br /><br /><br /><br /><br /><br /><br/><br /><br /><p><hr size="1" />Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <a href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ"> Try it now.</a>
В списке pgsql-hackers по дате отправления: