Re: left outer join terrible slow compared to inner join
От | Greg Stark |
---|---|
Тема | Re: left outer join terrible slow compared to inner join |
Дата | |
Msg-id | 873cfljm4j.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: left outer join terrible slow compared to inner join (Mike Mascari <mascarm@mascari.com>) |
Ответы |
select taking forever
|
Список | 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 по дате отправления: