Stranger than fiction...

From: Fran Fabrizio <ffabrizio(at)exchange(dot)webmd(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Stranger than fiction...
Date: 2001-05-01 17:05:56
Message-ID: 3AEEECF4.A6E85E2C@exchange.webmd.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Sorry for the double, but I just stripped down my query on my status
table and saw some interesting results....

Table "status"
Attribute | Type | Modifier
-----------+-----------+----------
site_id | bigint | not null
host_id | bigint | not null
product | varchar() | not null
class | varchar() | not null
subclass | varchar() | not null
status | varchar() | not null
msg | varchar() |
tstamp | timestamp |
Indices: status_5_column_index,
status_host_id_key,
status_site_id_key

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.
=)

Thank you,
Fran

Responses

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-05-01 17:44:16 Re: Re: SQL Where Like - Range it?!
Previous Message Fran Fabrizio 2001-05-01 16:51:39 Multicolumn index - is there a limit?