Re: Large querie with several EXISTS which will be often runned

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Large querie with several EXISTS which will be often runned
Дата
Msg-id 200306270841.40634.josh@agliodbs.com
обсуждение исходный текст
Ответ на Large querie with several EXISTS which will be often runned  ("Bruno BAGUETTE" <pgsql-ml@baguette.net>)
Ответы RE : Large querie with several EXISTS which will be often runned
Список pgsql-performance
Bruno,

> I will have to manage more or less 10.000 products with more or less 2-3
> options by products and more or less 40 options-groups.
>
> Do you think that this query will be hard for PostgreSQL (currently
> 7.2.1 but I will migrate to 7.3.2 when going in production environment)
> ?
> How can I improve that query to be faster ?

Collapse the inner EXISTS into a straight join in the outer EXISTS.  Since you
are merely checking for existence, there is no reason for the subquery
nesting.

--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: "Bruno BAGUETTE"
Дата:
Сообщение: Large querie with several EXISTS which will be often runned
Следующее
От: "Patrick Hatcher"
Дата:
Сообщение: Memory question