Re: Optimization idea

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Optimization idea
Дата
Msg-id AANLkTikqfvY_tCJbxg_lE0ccqvxecKmowpId5_YF3zog@mail.gmail.com
обсуждение исходный текст
Ответ на Optimization idea  (Vlad Arkhipov <arhipov@dc.baikal.ru>)
Ответы Re: Optimization idea  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
Список pgsql-performance
On Wed, Apr 28, 2010 at 5:37 AM, Vlad Arkhipov <arhipov@dc.baikal.ru> wrote:
> Even if it will be done it does not solve the original issue. If I
> understood you right there is now no any decent way of speeding up the query
>
> select *
> from t2
> join t1 on t1.t = t2.t
> where t1.id = X;
>
> except of the propagating the t1.id value to the table t2 and createing and
> index for this column?

No, what I'm saying is that if X is any ANY() expression, you can get
a faster plan in this case by writing:

SELECT * FROM t2 JOIN t1 ON t1.t = t2.t WHERE t2.id = X;

For me this is about 8x faster.

...Robert

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: autovacuum strategy / parameters
Следующее
От: Cédric Villemain
Дата:
Сообщение: Re: Optimization idea