pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jing han <jing_han_66@yahoo.com>
To: pgsql-interfaces@postgresql.org
Subject: about libpq-C FETCH ALL performance issue
Date: Wed, 10 Nov 2004 14:09:47 -0800 (PST)
Message-ID: <20041110220947.72060.qmail@web53503.mail.yahoo.com> (raw)

Hello,

I'm working on a project where libpq-C is envolved. We
have several background processes keep querying
certain data from database and send them out as ip
packets. With libpq-C interface, I have to use 

res = PQexec(conn, "DECLARE myportal CURSOR FOR select
* from pg_database");

and then  res = PQexec(conn, "FETCH ALL in myportal");


to get the data. 

I found when our database has more and more data, res
= PQexec(conn, "FETCH ALL in myportal"); cost more and
more time, much more than 

res = PQexec(conn, "DECLARE myportal CURSOR FOR select
* from pg_database"); 

and make our sending packet rate extremely low. We get
into big problems here. 

I wonder if there is other faster way ( I mean other
than FETCH ALL command) to get data from database with
libpq-C, or If you have a patch to fix this problem.

Hope to hear from you soon.


Best Regards

jing


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 




view thread (3+ messages)  latest in thread

Message-ID: <20041110220947.72060.qmail@web53503.mail.yahoo.com>
Permalink:  ../20041110220947.72060.qmail@web53503.mail.yahoo.com/
Also on:    postgresql.org/message-id/20041110220947.72060.qmail@web53503.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jing_han_66@yahoo.com
  Subject: Re: about libpq-C FETCH ALL performance issue
  In-Reply-To: <20041110220947.72060.qmail@web53503.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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