Re: Simple select, but takes long time

Поиск
Список
Период
Сортировка
От andrew@pillette.com
Тема Re: Simple select, but takes long time
Дата
Msg-id 200801120537.m0C5bTJ18551@pillette.com
обсуждение исходный текст
Ответ на Simple select, but takes long time  ("James DeMichele" <James.DeMichele@redfin.com>)
Ответы Re: Simple select, but takes long time  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
"James DeMichele" <James.DeMichele@redfin.com> wrote ..

> Then, I have the following index on the table:

> "this_index" (status, source_id, <another_column>)

If you have many queries of this type, do

CLUSTER this_index ON tablename;

and retry the SELECT.

MySQL is using some sort of auto-clustering ISAM on the other box mayhaps?

In Postgres you will have to re-CLUSTER periodically if there are INSERTs and UPDATEs.

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

Предыдущее
От: david@lang.hm
Дата:
Сообщение: Re: Best way to index IP data?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Simple select, but takes long time