Unix Technical Forum

Re: How can I configure the postgresql odbc to return 1 row at a time?

This is a discussion on Re: How can I configure the postgresql odbc to return 1 row at a time? within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> --- Jerry Lam <jlam@sandvine.com> wrote: > Hi, > > Is it possible to ask postgresql odbc driver to > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 02:08 AM
Jeff Eckermann
 
Posts: n/a
Default Re: How can I configure the postgresql odbc to return 1 row at a time?

--- Jerry Lam <jlam@sandvine.com> wrote:
> Hi,
>
> Is it possible to ask postgresql odbc driver to
> fetch the resulsets from the table one at a time
> instead of fetching all millions rows into memory?


Perhaps setting the "Use declare/fetch" driver option
to true will help you. This will cause a server side
cursor to be used, which will return the rows in
blocks. What controls the size of the blocks, I have
no idea; I've never messed with that.

>
> Thank you,
>
> Jerry
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 02:08 AM
Marko Ristola
 
Posts: n/a
Default Re: How can I configure the postgresql odbc to return 1 row


You can use in the odbc.ini configuration the following
definitions:

Fetch = 2048
UseDeclareFetch = 1

"Fetch" defines the number of rows to fetch at a time.
UseDeclareFetch activates the feature.

Regards,
Marko Ristola

Jeff Eckermann wrote:

>--- Jerry Lam <jlam@sandvine.com> wrote:
>
>
>>Hi,
>>
>>Is it possible to ask postgresql odbc driver to
>>fetch the resulsets from the table one at a time
>>instead of fetching all millions rows into memory?
>>
>>

>
>Perhaps setting the "Use declare/fetch" driver option
>to true will help you. This will cause a server side
>cursor to be used, which will return the rows in
>blocks. What controls the size of the blocks, I have
>no idea; I've never messed with that.
>
>
>
>>Thank you,
>>
>>Jerry
>>
>>---------------------------(end of
>>broadcast)---------------------------
>>TIP 5: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/docs/faq
>>
>>
>>

>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Small Business - Try our new resources site!
>http://smallbusiness.yahoo.com/resources/
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:42 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com