pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
About FetchBufferSize and row caching for postgres odbc
3+ messages / 2 participants
[nested] [flat]

* About FetchBufferSize and row caching for postgres odbc
@ 2013-08-14 05:26 Michael Paquier <michael.paquier@gmail.com>
  2013-08-15 17:11 ` Re: About FetchBufferSize and row caching for postgres odbc Heikki Linnakangas <hlinnakangas@vmware.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2013-08-14 05:26 UTC (permalink / raw)
  To: 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


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: About FetchBufferSize and row caching for postgres odbc
  2013-08-14 05:26 About FetchBufferSize and row caching for postgres odbc Michael Paquier <michael.paquier@gmail.com>
@ 2013-08-15 17:11 ` Heikki Linnakangas <hlinnakangas@vmware.com>
  2013-08-15 23:57   ` Re: About FetchBufferSize and row caching for postgres odbc Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Heikki Linnakangas @ 2013-08-15 17:11 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc

On 14.08.2013 08:26, Michael Paquier wrote:
> 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

psqlodbc doesn't have a parameter called "FetchBufferSize". Setting that 
in odbc.ini will therefore have no effect. There is a parameter called 
"Fetch", which sets the number of rows to fetch.

- Heikki


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: About FetchBufferSize and row caching for postgres odbc
  2013-08-14 05:26 About FetchBufferSize and row caching for postgres odbc Michael Paquier <michael.paquier@gmail.com>
  2013-08-15 17:11 ` Re: About FetchBufferSize and row caching for postgres odbc Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2013-08-15 23:57   ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael Paquier @ 2013-08-15 23:57 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: pgsql-odbc

On Fri, Aug 16, 2013 at 2:11 AM, Heikki Linnakangas
<hlinnakangas@vmware.com> wrote:
> On 14.08.2013 08:26, Michael Paquier wrote:
>>
>> 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
>
>
> psqlodbc doesn't have a parameter called "FetchBufferSize". Setting that in
> odbc.ini will therefore have no effect. There is a parameter called "Fetch",
> which sets the number of rows to fetch.
Oh I see. Thanks!
-- 
Michael


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-08-15 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 05:26 About FetchBufferSize and row caching for postgres odbc Michael Paquier <michael.paquier@gmail.com>
2013-08-15 17:11 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-08-15 23:57   ` Michael Paquier <michael.paquier@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox