pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bupp Phillips <hello@noname.com>
To: pgsql-performance@postgresql.org
Subject: Re: What is the fastest way to get a resultset
Date: Tue, 26 Aug 2003 02:18:23 -0700
Message-ID: <big5vk$hg0$1@news.hub.org> (raw)
References: <bidplp$pcn$1@news.hub.org>
	<Pine.BSF.4.44.0308251645360.15800-100000@torgo.978.org>

Is this something that can be done thru a SQL statement, or are you saying
that I need to develop logic to handle this because the database won't hold
the resultset on the server, but instead sends it all to the client?

It there a way to get server side cursors with Postgresql like SQLServer has
or is this a limitation that it has?

Thanks

"Jeff" <threshar@torgo.978.org> wrote in message
news:Pine.BSF.4.44.0308251645360.15800-100000@torgo.978.org...
> On Mon, 25 Aug 2003, Bupp Phillips wrote:
>
> >
> > I have a table that has 103,000 records in it (record size is about 953
> > bytes) and when I do a select all (select * from <table>) it takes a
> > whopping 30 secs for the data to return!!
> >
> > SQLServer on the other hand takes 6 secs, but you can also use what is
> > called a firehose cursor, which will return the data in < 1 sec.
> >
> You probably want a cursor.
> Typically what happens is postgres sends _all_ the data to the client -
> which can be rather substantial.  A cursor allows you to say "get me the
> first 1000 records. now the next 1000" - it should get you the speed you
> want.
>
>
> --
> Jeff Trout <jeff@jefftrout.com>
> http://www.jefftrout.com/
> http://www.stuarthamm.net/
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>





view thread (6+ messages)  latest in thread

Message-ID: <big5vk$hg0$1@news.hub.org>
Permalink:  ../big5vk$hg0$1@news.hub.org/
Also on:    postgresql.org/message-id/big5vk$hg0$1@news.hub.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: hello@noname.com
  Subject: Re: What is the fastest way to get a resultset
  In-Reply-To: <big5vk$hg0$1@news.hub.org>
  References: <bidplp$pcn$1@news.hub.org> <Pine.BSF.4.44.0308251645360.15800-100000@torgo.978.org> <big5vk$hg0$1@news.hub.org>

* 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