Re: Index ot being used

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Index ot being used
Дата
Msg-id 20050612173732.GA28838@wolff.to
обсуждение исходный текст
Ответ на Re: Index ot being used  (Madison Kelly <linux@alteeve.com>)
Список pgsql-performance
On Sun, Jun 12, 2005 at 10:12:27 -0400,
  Madison Kelly <linux@alteeve.com> wrote:
> Indexes:
>     "file_info_7_display_idx" btree (file_type, file_parent_dir, file_name)

>   Here is my full query:
>
> tle-bu=> EXPLAIN ANALYZE SELECT file_name, file_parent_dir, file_type
> FROM file_info_7 WHERE file_type='d' ORDER BY file_parent_dir ASC,
> file_name ASC;
>                                                          QUERY PLAN
>
-----------------------------------------------------------------------------------------------------------------------------

This is a case where postgres's planner can't make a deduction needed for
it to realize that the index can be used. Try rewriting the query as:

SELECT file_name, file_parent_dir, file_type
  FROM file_info_7 WHERE file_type='d'
  ORDER BY file_type ASC, file_parent_dir ASC, file_name ASC;

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Index ot being used
Следующее
От: Yves Vindevogel
Дата:
Сообщение: Updates on large tables are extremely slow