Re: Should I CLUSTER on PRIMARY KEY

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Should I CLUSTER on PRIMARY KEY
Дата
Msg-id 20090720021857.GL5407@samason.me.uk
обсуждение исходный текст
Ответ на Re: Should I CLUSTER on PRIMARY KEY  (Robert James <srobertjames@gmail.com>)
Список pgsql-general
On Sun, Jul 19, 2009 at 08:56:08PM -0400, Robert James wrote:
> Thanks, Chris.  Is there a way to do this deterministically, or at least
> programatically? I have code to create the tables and cluster them
> automatically?

As Chris said, the index used by the primary key uses the table name
with "_pkey" append on the end.  If you want to figure out how psql is
figuring this out, you can pass it -E when you connect.

Why do you care though?  CLUSTERing is a rather limited fix for a rather
specialized type of problem, it's not something that's worth setting
for every table and almost certainly not just blindly doing it on the
table's primary key.

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: timestamp with time zone tutorial
Следующее
От: Phoenix Kiula
Дата:
Сообщение: Re: Best practices for moving UTF8 databases