Re: left outer join terrible slow compared to inner join

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Mike Mascari <mascarm(at)mascari(dot)com>
Cc: Clay Luther <claycle(at)cisco(dot)com>, Greg Stark <gsstark(at)Mit(dot)Edu>, pgsql-general(at)postgresql(dot)org
Subject: Re: left outer join terrible slow compared to inner join
Date: 2003-08-29 01:19:56
Message-ID: 873cfljm4j.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Mike Mascari <mascarm(at)mascari(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Clay Luther 2003-08-29 01:31:31 Re: left outer join terrible slow compared to inner join
Previous Message Keow Yeong Huat Joseph 2003-08-29 01:07:26 Re: Install PostgreSQL on AIX 5.1