pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: Carlos Lopez <chlopezl@yahoo.com>
Cc: pgsql-performance@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [PERFORM] poor performance in migrated database
Date: Sat, 06 Nov 2004 21:39:10 +0000
Message-ID: <1099777150.6942.393.camel@localhost.localdomain> (raw)
In-Reply-To: <20041106195215.91282.qmail@web52706.mail.yahoo.com>
References: <20041106195215.91282.qmail@web52706.mail.yahoo.com>

On Sat, 2004-11-06 at 19:52, Carlos Lopez wrote:
> The problem is that there are many nested views which
> normally join tables by using two fields, one
> character and other integer.

PostgreSQL has difficulty with some multi-column situations, even though
in general it has a particularly good query optimizer.

If the first column is poorly selective, yet the addition of the second
column makes the combination very highly selective then PostgreSQL may
not be able to realise this, ANALYZE or not. ANALYZE doesn't have
anywhere to store multi-column selectivity statistics. 

EXPLAIN ANALYZE will show you whether this is the case. It seems likely
that the estimated cardinality of certain joins is incorrect.

-- 
Best Regards, Simon Riggs




view thread (8+ messages)  latest in thread

Message-ID: <1099777150.6942.393.camel@localhost.localdomain>
Permalink:  ../1099777150.6942.393.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1099777150.6942.393.camel@localhost.localdomain

 · 

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-performance@postgresql.org
  Cc: simon@2ndquadrant.com, chlopezl@yahoo.com, pgsql-admin@postgresql.org
  Subject: Re: [PERFORM] poor performance in migrated database
  In-Reply-To: <1099777150.6942.393.camel@localhost.localdomain>

* 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