Re: Question on indexes

Поиск
Список
Период
Сортировка
От Durgamahesh Manne
Тема Re: Question on indexes
Дата
Msg-id CAJCZkoKAhQ2VC-eA4zWgxfW5nTAA2N4V5vrsWFXHPVvVg0WdfQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question on indexes  (Greg Sabino Mullane <htamfids@gmail.com>)
Список pgsql-general


On Fri, Oct 11, 2024 at 6:18 PM Greg Sabino Mullane <htamfids@gmail.com> wrote:
(please start a new thread in the future rather than replying to an existing one)

You cannot query on b and use an index on (a,b) as you observed. However, you can have two indexes:

index1(a)
index2(b)

Postgres will be able to combine those when needed in the case where your WHERE clause needs to filter by both columns. So then you no longer need the two-column index.

Cheers,
Greg

 
Hi greg 

Mail sent you with a new thread. composite key is on partitioned table 

Regards,
Durga Mahesh  

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