From: Scott Marlowe <scott.marlowe@gmail.com>
To: s.borse@direction.biz
Cc: Julius Tuskenis <julius@nsoft.lt>
Cc: pgsql-admin@postgresql.org
Subject: Re: query optimization
Date: Thu, 10 Jul 2008 09:47:29 -0600
Message-ID: <dcc563d10807100847y1d6f5f5ei4e1e380ecc4c3c24@mail.gmail.com> (raw)
In-Reply-To: <1215683144.2113.35.camel@dss-052.dsslp.com>
References: <1215680493.2113.26.camel@dss-052.dsslp.com>
<4875D589.1030107@nsoft.lt>
<1215683144.2113.35.camel@dss-052.dsslp.com>
On Thu, Jul 10, 2008 at 3:45 AM, Suresh Borse <s.borse@direction.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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott.marlowe@gmail.com, s.borse@direction.biz, julius@nsoft.lt
Subject: Re: query optimization
In-Reply-To: <dcc563d10807100847y1d6f5f5ei4e1e380ecc4c3c24@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox