Search Postgresql Archives

Re: Multithreaded query onto 4 postgresql instances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15 Feb 2011, at 9:32, Alessandro Candini wrote:

>> Is that a single query on that one DB compared to 4 queries on 4 DB's? How does a single DB with 4 parallel queries perform? I'd expect that to win from 4 DB's, due to the overhead those extra DB instances are generating.
> 
> Maybe my configuration and test is not clear

It is clear. I gave you another suggestion for something to try instead.

> Splitted instances:
> 600 millions of records in total splitted into 4 postgresql instances (port 5433, 5434, 5435, 5436), let's say more or less:
> 
> 5433 ---> 150 millions of records
> 5434 ---> 150 millions of records
> 5435 ---> 150 millions of records
> 5436 ---> 150 millions of records

Try the above on a single DB using 4 threads. It will very probably perform better.
To use your example:
5432 ---> 150 million records
5432 ---> 150 million records
5432 ---> 150 million records
5432 ---> 150 million records

>> Did you read all the way to section 35.9.10? That explains how to create SRF's like yours, including examples. If the step from simple functions to SRF's is too large for you, create a few sample-functions to learn how the intermediary steps work. We can't upload the info to your brain, after all - you'll have to do the learning part by yourself.
>> 
> Do you think is a good idea continue using libpq or should I abandon them and focus on postgresql documentation examples?

To learn how to write functions like these? Best to use a simple case so it's clear what's going on. If you try to alter already complicated code for that purpose you'll probably just get more confused.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4d5ac6b711731056715104!



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux