Re: [INTERFACES] fetching way too much or too often???

From: Byron Nikolaidis <byronn(at)solipsys(dot)com>
To: JT Kirkpatrick <jt-kirkpatrick(at)mpsllc(dot)com>
Cc: "'Ken J(dot) Wright'" <ken(at)ori-ind(dot)com>, "'pgsql-interfaces(at)hub(dot)org'" <pgsql-interfaces(at)hub(dot)org>
Subject: Re: [INTERFACES] fetching way too much or too often???
Date: 1999-06-30 19:26:58
Message-ID: 377A6F82.BD9E814@solipsys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

JT Kirkpatrick wrote:

> well, with use declare / fetch turned OFF on everyone's machine, the
> activity on the server per user action appears to be less than 1/5th!
> (i.e., greatly reduced!). we have been running now for an hour with no
> lockups -- that hasn't happened yet today! but i also made another change
> at the same time as removing declare/fetch -- i increased the buffers in
> the startup script on the server from 256 to 512 (and then restarted).
> earlier today i removed the -B option altogether, letting it use default
> 64 buffers -- and we started locking up like crazy! so i don't know which
> is making the difference -- the buffers or no declare/fetch. . . but in
> any case, for the benefit of all who read this, unchecking declare / fetch
> SIGNIFICANTLY reduces the activity between the client and a postgres
> server!!!
>

The reason the Declare/Fetch option exists is for the kind of scenario where
you need to fetch, oh let's say, 1,000,000 rows, which is not uncommon in Data
Mining applications. Without the Declare/Fetch, your PC would very likely run
out of memory, because the driver would try to cache the entire result set (
all 1,000,000 rows) in its own memory. With the Declare/Fetch on, the driver
only caches 100 rows at a time. When the cache has been depleted, another 100
rows are fetched. The 100 rows is actually configurable on the driver options
dialog (cache size).

So, I'm glad you're problem is fixed. But I just wanted you to know why the
Declare/Fetch option is still important.

Byron

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Byron Nikolaidis 1999-06-30 20:04:32 ODBC Driver Declare/Fetch and Postgres 6.5
Previous Message JT Kirkpatrick 1999-06-30 19:13:00 RE: [INTERFACES] fetching way too much or too often???