Re: Stranger than fiction...

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "Fran Fabrizio" <ffabrizio(at)exchange(dot)webmd(dot)net>
Cc: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Stranger than fiction...
Date: 2001-05-02 14:40:13
Message-ID: 003b01c0d315$e7285d10$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> This table currently has 224 rows of data in it.
>
> The following queries *ALL* take approx. .433 seconds to run.
>
> select * from status s where s.site_id = 18 and s.host_id = 49 and
> s.product = 'BETA' and s.class = 'APPS' and s.subclass = 'MONITOR' ;
> select * from status s where s.site_id = 18 and s.host_id = 49 and
> s.product = 'BETA';
> select * from status s where s.site_id = 18 and s.host_id = 49;
> select * from status s where s.site_id = 18;
> select * from status;
>
> Nothing gets triggered on a select off of this table. This table did
> have a view attached, but I dropped the view with the same results.
>
> So, I'm totally baffled as to how a simple select * on a 224-row table
> could take almost half a second to execute! Please help the neophyte.
> =)

Have you VACUUMed the table (with or without ANALYZE)? Beyond that, we
really need the results of the EXPLAIN to see what the database is doing and
how to improve on that.

Greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-05-02 14:45:09 Re: disk usage advice needed
Previous Message Per Schrder 2001-05-02 14:34:59 Re: Thread or not threads?