Re: SELECT * FROM <table> LIMIT 1; is really slow

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SELECT * FROM <table> LIMIT 1; is really slow
Date: 2004-05-26 21:17:08
Message-ID: c931ha$cs6$2@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Blasby wrote:

> I have a table with about 16,000,000 rows in it.
>
> When I do a:
>
> SELECT * FROM <table> LIMIT 1;
>
> it takes about 10 minutes (thats about how long it takes to do a full
> sequential scan).
>
> I had originally thought that there might be a large number of
> "wasted/retired" tuples in the table so I "vacuum analysed" the
> database. It had no effect. I had a "vacuum full" going on the table
> for 17 hours before I killed it.

Are you sure that the vacuum full was running or sitting there to
wait an idle transaction ?

Regards
Gaetano Mendola

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Blasby 2004-05-26 21:55:27 Re: SELECT * FROM <table> LIMIT 1; is really slow
Previous Message David Blasby 2004-05-26 21:00:47 SELECT * FROM <table> LIMIT 1; is really slow