Re: [PERFORM] poor performance in migrated database

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Carlos Lopez <chlopezl(at)yahoo(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [PERFORM] poor performance in migrated database
Date: 2004-11-06 21:39:10
Message-ID: 1099777150.6942.393.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-performance

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2004-11-06 23:00:15 Re: [PERFORM] poor performance in migrated database
Previous Message Troels Arvin 2004-11-06 20:26:15 Re: poor performance in migrated database

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2004-11-06 23:00:15 Re: [PERFORM] poor performance in migrated database
Previous Message Troels Arvin 2004-11-06 20:26:15 Re: poor performance in migrated database