Re: Index creation

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Index creation
Дата
Msg-id CAMkU=1z8C17d0KLX4ioz6u+k6UndyA7oFeNrMUQZzjSR=152zw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Index creation  (Дмитрий Иванов <firstdismay@gmail.com>)
Ответы Re: Index creation  (Дмитрий Иванов <firstdismay@gmail.com>)
Список pgsql-general
On Mon, Jun 20, 2022 at 1:17 AM Дмитрий Иванов <firstdismay@gmail.com> wrote:
Your statement seems obvious to me. But what I see doesn't seem like a conscious choice. It turns out that it is better to have a lighter general-purpose index than to strive to create a target covering index for a certain kind of operation.

If both indexes are expected to be hit only once in the query and return only one row, their expected costs will be the same.  In this case, the tie is broken arbitrarily, and that often means the most-recently created index will get chosen.

As the expected number of leaf page accesses in a given query goes up, the smaller index will start to look less expensive.

Cheers,

Jeff 

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

Предыдущее
От: "Mahendrakar, Prabhakar - Dell Team"
Дата:
Сообщение: RE: Postgresql error : PANIC: could not locate a valid checkpoint record
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: A error happend when I am clone the git repository