Re: FET_BUF_SIZE or How do I optimize cursor reads?
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
"Art S. Kagel" wrote: > <snip> > To Heiko, reread the manual, FetBufSize is ONLY effective BEFORE > the first cursor is opened, at that time the ESQL library sets the buffer > sizing for the life of the session. To set different buffer sizing for > different cursors you MIGHT try separate sessions but I'mnot certain that > will help. Hi Art, please check page 14-22 of the ESQL/C manual ( http://www.informix.com/answers/english/docs/23sdk/5423.pdf): "You set the size of the cursor buffer at the point that you make the assignement to the FetBufSize variable. This new size takes efffect the next time ESQL/C check the buffer size. ESLQ/C checks the size of the cursor buffer when it allocates the cursor buffer. ESQL/C also checks the size of a fetch buffer when it tells the database server how many rows to send at one time". Cursor buffers are allocated when cursors are declared. I think that what you are thinking of is the environment variable FET_BUF_SIZE, which defines a per session default for FetBufSize (but this default can be overridden at any time by resetting FetBufSize - see same page of the ESQL/C manual). Hope this helps, Heiko
I have to compare my VERY OLD (as in pre-documentation) document to the new ESQL/C manual now. Well, I like your reading better than mine anyway. Thanks for the correction. Art S. Kagel Heiko Giesselmann wrote: > > "Art S. Kagel" wrote: > > > <snip> > > > To Heiko, reread the manual, FetBufSize is ONLY effective BEFORE > > the first cursor is opened, at that time the ESQL library sets the buffer > > sizing for the life of the session. To set different buffer sizing for > > different cursors you MIGHT try separate sessions but I'mnot certain that > > will help. > > Hi Art, > > please check page 14-22 of the ESQL/C manual ( > http://www.informix.com/answers/english/docs/23sdk/5423.pdf): "You set the size of > the cursor buffer at the point that you make the assignement to the FetBufSize > variable. This new size takes efffect the next time ESQL/C check the buffer size. > ESLQ/C checks the size of the cursor buffer when it allocates the cursor buffer. > ESQL/C also checks the size of a fetch buffer when it tells the database server > how many rows to send at one time". > > Cursor buffers are allocated when cursors are declared. I think that what you are > thinking of is the environment variable FET_BUF_SIZE, which defines a per session > default for FetBufSize (but this default can be overridden at any time by > resetting FetBufSize - see same page of the ESQL/C manual). > > Hope this helps, Heiko