Обсуждение: Partial Index Creation

Поиск
Список
Период
Сортировка

Partial Index Creation

От
Armand du Plessis
Дата:
Hey guys, 

Just a quick general question around index creation. 

When creating a partial index on a fairly large table (200gb) where an index already exists that would satisfy the partial index criteria would there still be a scan of the entire table or will it use the existing index when creating the new one? 

Hope the question make sense. 

Re: Partial Index Creation

От
Strahinja Kustudić
Дата:
Nice question, I would also like to know this.

Btw, why do you want to create a new partial index which is already covered by a regular index? Do you want to remove that regular index after creating the partial one?

Regards,
Strahinja

On Fri, Nov 22, 2013 at 4:55 PM, Armand du Plessis <adp@bank.io> wrote:
Hey guys, 

Just a quick general question around index creation. 

When creating a partial index on a fairly large table (200gb) where an index already exists that would satisfy the partial index criteria would there still be a scan of the entire table or will it use the existing index when creating the new one? 

Hope the question make sense. 

Re: Partial Index Creation

От
Armand du Plessis
Дата:

On Fri, Nov 22, 2013 at 10:34 PM, Strahinja Kustudić <strahinjak@nordeus.com> wrote:
Nice question, I would also like to know this.

Btw, why do you want to create a new partial index which is already covered by a regular index? Do you want to remove that regular index after creating the partial one?

Something like that yes. The new index incorporates columns not covered by the existing index as well as a more restrictive conditional expression.