Thread: using cursors?
Is this a setting in the connection string?
UseDeclareFetch=0;
Sorry for asking dumb questions, guess I will dig out the manual and start R&D.
Joel Fradkin
Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel. 941-753-7111 ext 305
jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments.
Correct with UseDeclareFetch: "UseDeclareFetch = 1 activates the internal cursor usage in SELECT queries with low memory consumption, in psqlodbc. I don't know about other ODBC drivers. "Fetch = 100" informs the psqlodbc driver: UseDeclareFetch fetches at most 100 rows at a time. (with 101 result rows, the backend delivers with first "cursor fetch" the 100 rows. Next time only one row will be delivered). My opinion is, that 100 is high enough. With 1000 rows, the crash risk is much higher. It might be, that with 32, the speed is slightly better: It might be, that if the whole data fits into the CPU cache in Windows, the performance is at it's best: my laptop is extremely fast, and that seems, that it is so, because of 1 meg CPU cache. With 256k cache the speed decreases. You can confirm the cursor usage with ODBC trace: Trace=1 CommLog=1 Debug=1 This will store debug information into mylog... files and psqodbc* files. The following information will show the cursor usage in mylog*.log: stmt='select count(*) from test1' stmt_with_params = 'declare SQL_CUR0x808d760 cursor for select count(*) from test1' So, here I issued the command "select count(*) from test1". Psqlodbc changed it into "declare XXX cursor for select count(*) from test1" Marko Ristola Joel Fradkin wrote: > Is this a setting in the connection string? > > UseDeclareFetch=0; > > Sorry for asking dumb questions, guess I will dig out the manual and > start R&D. > > > > Joel Fradkin > > > > Wazagua, Inc. > 2520 Trailmate Dr > Sarasota, Florida 34243 > Tel. 941-753-7111 ext 305 > > > > jfradkin@wazagua.com <mailto:jfradkin@wazagua.com> > www.wazagua.com <http://www.wazagua.com> > Powered by Wazagua > Providing you with the latest Web-based technology & advanced tools. > © 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc > This email message is for the use of the intended recipient(s) and > may contain confidential and privileged information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not > the intended recipient, please contact the sender by reply email and > delete and destroy all copies of the original message, including > attachments. > > > > > > > >