Re: select off of a view going slowly - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: select off of a view going slowly
Date
Msg-id 3AF86AFF.CC980E22@exchange.webmd.net
Whole thread Raw
In response to select off of a view going slowly  (Fran Fabrizio <ffabrizio@exchange.webmd.net>)
List pgsql-general
Tom Lane wrote:

> Fran Fabrizio <ffabrizio@exchange.webmd.net> writes:
> > However, with the new query, depending on the values of site_id and host_id,
> > execution time varies from .002 to 1.617 seconds!
>
> Does one site and/or host have many more table entries than the other?

I just tried clustering the table around that siteid_hostid_index and it did
reduce the number of blocks read from 15000 to 2200 for the query.  However,
still running pretty slow (.9 second).  I'm beginning to think I need something
more robust than a view.  Perhaps I need to build an error_log table that gets
updated via trigger upon insert into log.  We shall see.

Thanks,
Fran


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: poor performance on 7.1 vs 7.0
Next
From: Tom Lane
Date:
Subject: Re: ALTER COLUMN