Re: left outer join terrible slow compared to inner join - Mailing list pgsql-general

From Greg Stark
Subject Re: left outer join terrible slow compared to inner join
Date
Msg-id 873cfljm4j.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: left outer join terrible slow compared to inner join  (Mike Mascari <mascarm@mascari.com>)
Responses select taking forever
List pgsql-general
Mike Mascari <mascarm@mascari.com> writes:

> > 1) Our database is highly normalized.

If anything I was worried it was "excessively" normalized. Sometimes people go
overboard, taking columns that really could be simple attributes and make them
reference tables. But that usually doesn't cause performance problems, just
programmer headaches. It was just a first impression, the simple number of
tables isn't evidence.

> > 2) All joins in the query are performed across indeces.

Ok, well only one of the table accesses is actually using an index in that
plan. I don't understand what's going on in enough detail to explain why.

Perhaps the optimizer thinks the tables are just small enough to not make them
worthwhile.

Which columns actually have indexes, are they all the same data type as the
value they're being compared against?

--
greg

pgsql-general by date:

Previous
From: "Keow Yeong Huat Joseph"
Date:
Subject: Re: Install PostgreSQL on AIX 5.1
Next
From: "Clay Luther"
Date:
Subject: Re: left outer join terrible slow compared to inner join