Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/data/web/virtuals/98151/virtual) in /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php on line 465

Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/wp-simple-firewall/src/lib/vendor/fernleafsystems/wordpress-services/src/Core/Fs.php:465) in /data/web/virtuals/98151/virtual/www/subdom/postgresql/wp-content/plugins/disable-xml-rpc-pingback/disable-xml-rpc-pingback.php on line 51
Design patterns Archives - PostgreSQL Candies

Use cases for WINDOW functions

Window functions works only in non-grouped select statement. Basically they allow us to look backwards or forwards in data – from the point of view of currently processed record. With this said we can easily think about values we would like to have: row number...

Use cases for GROUP BY aggregate functions

I believe use cases for aggregate functions are clear from these functions. average sum count creation of string with list of values, array of values, min max boolean and/ or over some interval of values binary and/ or over some interval of values and of course all...

PostgreSQL and high data load application

I have heard complains that PostgreSQL is “old crap” because it cannot handle more than several millions records per day. Well people this is not truth at all. I have worked with application which was able to load and process from 1 000 000 to 3 000 000...

Parallel run of queries / functions using dblink – example 1

To make things more clear here is first example of parallel run of functions in PostgreSQL using dblink. This simplest solution presumes: you have some limited list of tasks and/ or connections you need to run you have HW powerful enough to run all tasks at once...