Re: speeding up a select with C function?

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: speeding up a select with C function?
Дата
Msg-id 1078671774.57624.52.camel@jester
обсуждение исходный текст
Ответ на speeding up a select with C function?  (David Teran <david.teran@cluster9.com>)
Список pgsql-performance
> I have run vacuum analyze before executing the statements. I wonder now
> if there is any chance to speed this up.

Is this an active table for writes? You may want to take a look at
CLUSTER. In some circumstances, it can take an order of magnitude off
the query time by allowing less pages to be retrieved from disk.

Other than that, if you're willing to drop performance of all queries
not hitting the table to speed up this one, you can pin the index and
table into memory (cron job running a select periodically to ensure it
sticks).

Shrink the actual data size (Drop the OID column, use a smallint instead
of an integer, etc.)


One final option is to alter PostgreSQL into possibly doing a
sudo-sequential scan on the table when reading indexes, rather than
pulling data from the table in a random order as it is found in the
index. This is a rather complex project, but doable.
http://momjian.postgresql.org/cgi-bin/pgtodo?performance


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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Fixed width rows faster?
Следующее
От: "Steven Butler"
Дата:
Сообщение: Using bigint needs explicit cast to use the index