About FetchBufferSize and row caching for postgres odbc - Mailing list pgsql-odbc

From Michael Paquier
Subject About FetchBufferSize and row caching for postgres odbc
Date
Msg-id CAB7nPqRiFN6z7aqyWQBnvWsxq-XVxDGyq=14fE0Q5VTJB68cPQ@mail.gmail.com
Whole thread Raw
Responses Re: About FetchBufferSize and row caching for postgres odbc  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-odbc
Hi all,

I got a couple of questions about the use of FetchBufferSize (one of
the settings of odbc.ini) and row caching in pgodbc.

Depending on the driver used with ODBC, sometimes FetchBufferSize
means the maximum number of rows, or a maximum size of data that can
be kept on cache on client side. Which definition of FetchBufferSize
does pgodbc use? I assume the max number of rows... But I couldn't
figure out which one it is even by looking at the pgodbc documentation
like the one on pgfoundry

Also, I noticed by googling here and there that some people recommend
a value of FetchBufferSize of sometimes several thousands, like 64000,
or even up to 100. I imagine that a too high value here could cause
some OOM with large rows on client if FetchBufferSize means the max
number of rows. This is a very vague question, but: what is the most
common usage for this parameter, high or low value? Is it better to
give preference to the db-level caching and fetch rows with some extra
fetches?

Finally, I got an extra question about row caching. Is row caching
done each time a fetch is done (SQLFetch, SQLExtendedFetch and
SQLFetchScroll)? Or is it necessary to use some special settings for a
statement handle like for example a dynamic cursor that can be used
with FetchScroll?
Perhaps using one option or the other presents more risks in terms of
high-memory usage?

Is there an area in the code where I should look at in priority to get
an idea of how row caching is done? With a quick glance, qresults.c
with QResultClass?

Regards,
--
Michael


pgsql-odbc by date:

Previous
From: Andrei Gheorghe
Date:
Subject: Calling a stored procedure with an array parameter
Next
From: Heikki Linnakangas
Date:
Subject: UseServerSidePrepare and data-at-execution