About FetchBufferSize and row caching for postgres odbc

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: About FetchBufferSize and row caching for postgres odbc
Date: 2013-08-14 05:26:13
Message-ID: CAB7nPqRiFN6z7aqyWQBnvWsxq-XVxDGyq=14fE0Q5VTJB68cPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2013-08-15 13:43:14 UseServerSidePrepare and data-at-execution
Previous Message Andrei Gheorghe 2013-08-13 08:32:57 Calling a stored procedure with an array parameter