Skip site navigation (1) Skip section navigation (2)

Re: Multithreaded query onto 4 postgresql instances

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: Alessandro Candini <candini(at)meeo(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Multithreaded query onto 4 postgresql instances
Date: 2011-02-16 18:27:01
Message-ID: D7A1A619-E246-44B2-96BA-974B702CA54C@solfertje.student.utwente.nl (view raw or flat)
Thread:
Lists: pgsql-general
On 16 Feb 2011, at 9:54, Alessandro Candini wrote:
>> 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
>> 
> 
> Excuse me but query must to be performed on the whole db...with your approach, how to merge results of every query in one single response?


You have several options there. You can limit the query results by adding WHERE-clauses restricting each query to a particular set of data (partial indices may help there). Or you can split the database across multiple schema's, emulating the multi-database setup you have now. Or you can partition your tables (across multiple tablespaces would probably be a good idea). Plenty of options there.

Alban Hertroys

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


!DSPAM:737,4d5c16fc11737633677592!



In response to

pgsql-general by date

Next:From: Richard BroersmaDate: 2011-02-16 19:52:58
Subject: PGDay LA @ SCALE 9X : 1 week away
Previous:From: Andrew SullivanDate: 2011-02-16 16:33:22
Subject: Re: Raid Controller Write Cache setting for WAL and Data

Privacy Policy | About PostgreSQL
Copyright © 1996-2013 The PostgreSQL Global Development Group