Re: Why does cluster need the indexname?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why does cluster need the indexname?
Дата
Msg-id 8472.961183018@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Why does cluster need the indexname?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
>> I'm probably just missing the point, but why do I have to specify the
>> indexname for cluster if the table already has a primary key? Wouldn't
>> cluster want to use the primary key for the table (if it exists) anyway?

No, you wouldn't necessarily want to cluster on the primary key.
You might be using the primary key to enforce logical consistency,
but be doing most of your actual scans on some secondary index.

I always thought that CLUSTER was being redundant in the other
direction: if you've told it the index name, there's no need to
tell it the base table name.  It can find that out from the index.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Why does cluster need the indexname?
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: planner question re index vs seqscan