Re: What is the fastest way to get a resultset

From: "Bupp Phillips" <hello(at)noname(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: What is the fastest way to get a resultset
Date: 2003-08-26 09:18:23
Message-ID: big5vk$hg0$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)torgo(dot)978(dot)org> wrote in message
news:Pine(dot)BSF(dot)4(dot)44(dot)0308251645360(dot)15800-100000(at)torgo(dot)978(dot)org(dot)(dot)(dot)
> 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(at)jefftrout(dot)com>
> http://www.jefftrout.com/
> http://www.stuarthamm.net/
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff 2003-08-26 12:34:01 Sun vs a P2. Interesting results.
Previous Message Ang Chin Han 2003-08-26 06:49:17 Re: Query too slow