Re: select off of a view going slowly

From: Fran Fabrizio <ffabrizio(at)exchange(dot)webmd(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: select off of a view going slowly
Date: 2001-05-08 21:54:07
Message-ID: 3AF86AFF.CC980E22@exchange.webmd.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

> Fran Fabrizio <ffabrizio(at)exchange(dot)webmd(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-05-08 22:09:20 Re: ALTER COLUMN
Previous Message Tom Lane 2001-05-08 21:53:30 Re: poor performance on 7.1 vs 7.0