Re: Slow response from 'SELECT * FROM table'

From: Wei Weng <wweng(at)kencast(dot)com>
To: Jakub Ouhrabka <jouh8664(at)ss1000(dot)ms(dot)mff(dot)cuni(dot)cz>, Jirka Novak <j(dot)novak(at)netsystem(dot)cz>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow response from 'SELECT * FROM table'
Date: 2002-11-11 17:19:47
Message-ID: 5.1.1.6.0.20021111121838.00ba47e8@mail.futuris.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I am curious, what performance difference does it make to use vanilla
SELECT with to use cursor (for retrieving the entire records)?

Thanks

Wei

At 11:13 AM 11/11/2002 +0100, Jakub Ouhrabka wrote:
>hi,
>
>do you really need all 500k records? if not i'd suggest using limit and
>offset clause (select * from table order by xy limit 100 - xy should be
>indexed...) or if you really need all records use a cursor.
>
>kuba
>
>On Mon, 11 Nov 2002, Jirka Novak wrote:
>
> > Hi,
> >
> > I have table with 30 columns and 30000..500000 rows. When I make
> > 'SELECT * FROM table' postgresql start doing something and return first
> > row after 10s (for 30k rows) and after 5min (500k rows). It looks like
> > it copy whole response to temp space and after that it shows it.
> > I don't know why. I tested same table structure and datas on Oracle
> > and MSSQL and both returned first row immediatly.
> > Have someone any idea?
> >
> > Jirka Novak
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
> >
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2002-11-11 17:28:04 Re: Slow response from 'SELECT * FROM table'
Previous Message Helge Bahmann 2002-11-11 11:56:11 Re: Upgrade to dual processor machine?