multiple indexes on the same column

Поиск
Список
Период
Сортировка
От Tiffany Thang
Тема multiple indexes on the same column
Дата
Msg-id CAB_W-NNpcyQEpMba42401yupk_7t4vY2cgA2gEty7oGTzUxd_w@mail.gmail.com
обсуждение исходный текст
Ответы Re: multiple indexes on the same column
Re: multiple indexes on the same column
Список pgsql-general
Hi,
Can someone explain the use of creating multiple indexes on the same column? 

How would the optimizer determine which index to use? From my brief testing, the optimizer picked the latest created index, testidx3. Can you provide a scenario where creating multiple indexes on the same column would be beneficial? 

create table test (a int, b int);
create index testidx1 on test (a);
create index testidx2 on test (a);
create index testidx3 on test (a);


Thanks.

Tiff

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