Re: Select in FOR LOOP Performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Select in FOR LOOP Performance
Дата
Msg-id 28975.1109960942@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Select in FOR LOOP Performance  (Charles Joseph <khocuihu@yahoo.com>)
Список pgsql-performance
Charles Joseph <khocuihu@yahoo.com> writes:
>     I face problem when running the following pgplsql
> function. The problem is it takes more than 24hours to
> complete
>     the calculation. The EMP table has about 200,000
> records.

Sure there are no infinite loops of PARENT links in your table?

Also, if CODE is supposed to be unique, you should probably declare
its index that way.  Or at least make sure the planner knows it's
unique (have you ANALYZEd the table lately?)

            regards, tom lane

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

Предыдущее
От: Charles Joseph
Дата:
Сообщение: Select in FOR LOOP Performance
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Help with tuning this query (with explain analyze finally)