From: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | s(dot)borse(at)direction(dot)biz |
Cc: | "Julius Tuskenis" <julius(at)nsoft(dot)lt>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: query optimization |
Date: | 2008-07-10 15:47:29 |
Message-ID: | dcc563d10807100847y1d6f5f5ei4e1e380ecc4c3c24@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Jul 10, 2008 at 3:45 AM, Suresh Borse <s(dot)borse(at)direction(dot)biz> wrote:
>
> Good Afternoon !!!
>
> The view executes very faster for the first time.
>
> When I execute the view again and again suddenly it gets slow or it gets
> hang.
>
> I have also traced the query plan but it changes for each execution.Can we
> fix the query plan.
>
> I have also tested the view on my test machine but the result was same.
>
> The view contains multi-table joins.
Do you have different where clauses for each time you execute it?
That can certainly affect performance each time, if you're where
clause is gonna grab 99% of the view, you'll get a different plan than
if you have a where clause that selects 0.01% of the table.
So yeah, we need explain analyze of each type of query that's fast
slow, and if there are ANY differences between them we need to know.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-10 16:21:44 | Re: query optimization |
Previous Message | Scott Marlowe | 2008-07-10 14:33:17 | Re: create database with template question |