Re: speeding up a select with C function?

Поиск
Список
Период
Сортировка
От Dennis Bjorklund
Тема Re: speeding up a select with C function?
Дата
Msg-id Pine.LNX.4.44.0403080720320.13979-100000@zigo.dhs.org
обсуждение исходный текст
Ответ на speeding up a select with C function?  (David Teran <david.teran@cluster9.com>)
Ответы Re: speeding up a select with C function?  (David Teran <david.teran@cluster9.com>)
Список pgsql-performance
On Sun, 7 Mar 2004, David Teran wrote:

>   we need to optimize / speed up a simple select:
>
> explain analyze select
> ((t0.int_value-t1.int_value)*(t0.int_value-t1.int_value))
> from job_property t0, job_property t1
> where t0.id_job_profile = 5
> and t1.id_job_profile = 6
> and t1.id_job_attribute = t0.id_job_attribute
> and t1.int_value < t0.int_value;

Try to add an index on (id_job_profile, id_job_attribute) or maybe even
(id_job_profile, id_job_attribute, int_value)

--
/Dennis Björklund


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

Предыдущее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: speeding up a select with C function?
Следующее
От: "Chris Smith"
Дата:
Сообщение: simple query join