Thread: Why create tuplestore for each fetch?

Why create tuplestore for each fetch?

From
高增琦
Date:
Hi, <br /><br />I am reading code about cursor and fetch ...<br />Here is a test:<br /><br />create table t (a int);<br
/>insertinto t values (1),(3),(5),(7),(9);<br />insert into t select a+1 from t;<br />begin;<br />declare c cursor for
select* from t order by a;<br /> fetch 3 in c;<br />fetch 3 in c;<br />fetch 3 in c;<br /><br />In func "PortalRun",
FillPortalStore(portal,isTopLevel) will create a <br />tuplestore for each query...<br />Why create tuplestore for each
fetch?<brclear="all" /><br />-- <br />GaoZengqi<br /><a href="mailto:pgf00a@gmail.com"
target="_blank">pgf00a@gmail.com</a><br/><a href="mailto:zengqigao@gmail.com"
target="_blank">zengqigao@gmail.com</a><br/>