Re: slow information schema with thausand users, seq.scan pg_authid

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: slow information schema with thausand users, seq.scan pg_authid
Дата
Msg-id 28046.1139250550@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: slow information schema with thausand users, seq.scan pg_authid  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Andrew - Supernews wrote:
>> Perhaps you missed the fact that the query was not one that he wrote,
>> but is the query that psql uses for \ds ?

> I did miss that.  Perhaps with dependency tracking and all, we don't 
> need the left joins anymore?

I don't see anything wrong with leaving the left joins as-is, on the
grounds that

1. the planner can simplify the left joins to inner joins, eg the
join to pg_namespace should be simplified on the strength of the
test on nspname.  (This seems to be broken in HEAD, but it does
work in 8.1 --- I think I broke it with the changes to treat IN
as a ScalarArrayOp.  Will fix.)

2. HEAD also knows how to change the order of the left joins at need.

The real question to me is why the planner doesn't want to use the
index on pg_authid.oid.  That's pretty curious ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: James William Pye
Дата:
Сообщение: Re: Copy From & Insert UNLESS
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Copy From & Insert UNLESS