Re: Parallel Scaling of a pgplsql problem - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Parallel Scaling of a pgplsql problem
Date
Msg-id 4F98128D0200002500047377@gw.wicourts.gov
Whole thread Raw
In response to Parallel Scaling of a pgplsql problem  (Venki Ramachandran <venki_ramachandran@yahoo.com>)
List 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 by date:

Previous
From: Samuel Gendler
Date:
Subject: Re: Parallel Scaling of a pgplsql problem
Next
From: Pavel Stehule
Date:
Subject: Re: Parallel Scaling of a pgplsql problem