Re: Question about clustering multiple columns

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Question about clustering multiple columns
Дата
Msg-id 20060616153132.GA9056@wolff.to
обсуждение исходный текст
Ответ на Question about clustering multiple columns  ("Benjamin Arai" <benjamin@araisoft.com>)
Список pgsql-general
On Tue, Jun 13, 2006 at 09:04:15 -0700,
  Benjamin Arai <benjamin@araisoft.com> wrote:
> Hi,
>
> I have a database where there are three columns (name,date,data).  The
> queries are almost always something like SELECT date,data FROM table WHERE
> name=blah AND date > 1/1/2005 AND date < 1/1/2006;.  I currently have three
> B-tree indexes, one for each of the columns.  Is clustering on date index
> going to be what I want, or do I need a index that contains both name and
> date?

I would expect that clustering on the name would be better for the above
query.
You probably want an index on name and date combined.

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Omitting tablespace creation from pg_dumpall...
Следующее
От: "LLC"
Дата:
Сообщение: PL/Perl questions...