Re: Bulk row fetching - Mailing list pgsql-general

From Carmen Wai
Subject Re: Bulk row fetching
Date
Msg-id F158ofmeSAWi9IcXCdq000057a7@hotmail.com
Whole thread Raw
In response to Bulk row fetching  ("Carmen Wai" <wai_carmen@hotmail.com>)
Responses Re: Bulk row fetching  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I want to implement a similar mechanism as bulk row fetching in MFC ODBC
classes for postgresql. For the very large record sets, it can fetch the
first (let say) 100 records. After that, it can automatically fetch the next
100 records WITHOUT executing the SQL statement again, it will save lots of
memory resouce / time.

I only find that postgresql support : select * from table_name limit N
offset M, but if I do it in this way, the DB need multiple execution which
will take up lots of time.

Do anyone gets any idea?


> > Hello:
> >
> > Do anyone know whether libpq of postgresql can support bulk row
>fetching,
> > which allow multiple records to be retrieved at once during a single
>fetch,
> > rather than retrieving one record at a time?
>
>Well, libpq will return a whole resultset. If that happens to contain
>multiple rows it gets multiple rows.
>
>Perhaps you should state more clearly what your problem is.
>
>Hope this helps,
>
>--
>Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> > There are 10 kinds of people in the world, those that can do binary
> > arithmetic and those that can't.




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


pgsql-general by date:

Previous
From: "Linn Kubler"
Date:
Subject: Re: Problem with Now()?
Next
From: Andrew Sullivan
Date:
Subject: Re: Why choose PostreSQL and not MySQL or Oracle!!