Re: Parallel Scaling of a pgplsql problem

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Parallel Scaling of a pgplsql problem
Дата
Msg-id 4F98128D0200002500047377@gw.wicourts.gov
обсуждение исходный текст
Ответ на Parallel Scaling of a pgplsql problem  (Venki Ramachandran <venki_ramachandran@yahoo.com>)
Список pgsql-performance
Venki Ramachandran <venki_ramachandran@yahoo.com> wrote:

> I have PostGres 9.0 database in a AWS server (x-large) and a
> pgplsql program that does some computation. It takes in a date
> range and for one pair of personnel (two employees in a company)
> it calculates some values over the time period. It takes about
> 40ms (milli seconds) to complete and give me the answer. All good
> so far.

Maybe; maybe not.  If you wrote out *how to do it* in your code, it
probably won't scale well.  The trick to scaling is to write
*declaratively*: say *what you want* rather than *how to get it*.

Aggregates, window functions, CTEs, and/or the generate_series()
function may be useful.  It's hard to give more specific advice
without more detail about the problem.

-Kevin

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

Предыдущее
От: Samuel Gendler
Дата:
Сообщение: Re: Parallel Scaling of a pgplsql problem
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Parallel Scaling of a pgplsql problem