pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: s.borse@direction.biz, "Julius Tuskenis" <julius@nsoft.lt>
To: pgsql-admin@postgresql.org
Subject: Re: query optimization
Date: Thu, 10 Jul 2008 12:21:44 -0400
Message-ID: <9895.1215706904@sss.pgh.pa.us> (raw)
In-Reply-To: <dcc563d10807100847y1d6f5f5ei4e1e380ecc4c3c24@mail.gmail.com>
References: <1215680493.2113.26.camel@dss-052.dsslp.com>
	<4875D589.1030107@nsoft.lt>
	<1215683144.2113.35.camel@dss-052.dsslp.com>
	<dcc563d10807100847y1d6f5f5ei4e1e380ecc4c3c24@mail.gmail.com>

On Thu, Jul 10, 2008 at 3:45 AM, Suresh Borse <s.borse@direction.biz> wrote:
>> 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.
>> The view contains multi-table joins.

Uh, how many joins?

If you're exceeding geqo_threshold then you would get plans with a
random component to them.  You might want to increase the threshold,
although planning time would probably go up.

Also, what PG version is this?

			regards, tom lane



view thread (6+ messages)

Message-ID: <9895.1215706904@sss.pgh.pa.us>
Permalink:  ../9895.1215706904@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9895.1215706904@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, julius@nsoft.lt
  Subject: Re: query optimization
  In-Reply-To: <9895.1215706904@sss.pgh.pa.us>

* 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