BUG #4690: an select query is not using the index

Поиск
Список
Период
Сортировка
От vikas
Тема BUG #4690: an select query is not using the index
Дата
Msg-id 200903041015.n24AFnhk092105@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4690: an select query is not using the index
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4690
Logged by:          vikas
Email address:      vikas.dubey@newgen.co.in
PostgreSQL version: PostgreSQL 7.3
Operating system:   i686-pc-linux-gnu
Description:        an select query is not using the index
Details:

hi

there is a table PDBFolder whose one column is Parentfolderindex on which an
index 'idx_folder_parentfolderindex' is created.

when i execute the following query

Select ParentFolderIndex From PDBFolder Where ParentFolderIndex In (
Select FolderId From FolderTree Where Leaf = 1::int4 )

it takes approximately 10 minutes and when i see the query execution plan of
this query it shows sequence scan on pdbfolder(which contain 50,000 rows).
can you suggest there is any way to use index idx_folder_parentfolderindex
in above query

regards
Vikas Dubey

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #4689: Expanding the length of a VARCHAR column should not induce a table rewrite
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #4689: Expanding the length of a VARCHAR column should not induce a table rewrite