Is there any way to do queries in postgis using multiple cores in a transparent way, other than splitting my queries among several client connections ?

closed as off-topic by Devdatta Tengshe, PolyGeo, Fezter, Ian Turton Nov 13 '13 at 10:47

  • This question does not appear to be about geographic information systems (GIS) within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    TThis question belongs on another site in the Stack Exchange network : dba.stackexchange.com – nickves Nov 12 '13 at 13:15
  • 3
    PostGIS is PostgreSQL extension and PG doesn't support parallelism yet (databasesoup.com/2013/05/…). For normal applications that ain't really a problem since you'd want db to handle multiple queries concurrently then one really fast. – Jakub Kania Nov 12 '13 at 15:04
  • 2
    Mostly the answer is "no", we share the limitation of PgSQL. If you use a parallel cluster architecture on top of PgSQL, like PostgresXC or Stado, you can potentially get parallel execution of things like spatial joins. – Paul Ramsey Nov 12 '13 at 17:38
  • 5
    5 close votes with no reason as to why? I don't see anything in gis.stackexchange.com/help/on-topic that would make this question off-topic. In fact, just the opposite. I'm voting for the re-open because 1) similar questions already exist with up-voted answers on gis.stackexchange.com and 2) Jakub's comment would be an acceptable answer that would add value to the site for future PostGIS users or GIS users looking to select a database for parallel spatial queries. – Jay Cummins Nov 12 '13 at 17:44
  • 1
    You might use pgpool to execute a single query in parallel, across the PostgreSQL/PostGIS servers in your pool. – Arthur Nov 12 '13 at 18:48

The quick answer is that you can't do parallel queries. Not yet, at least.

PostgreSQL, the most common database engine that processes PostGIS queries, has parallel query execution as a development priority. Although there has been some progress on the prerequisite background worker API in versions 9.3 and 9.4, the timing of this feature is probably not expected for at least a year or more.

Postgres-XC, a related project, allows some queries to be executed in parallel on multiple nodes. PostGIS needs to be built on each node using specific instructions.

Stado is another clustering effort with massively parallel processing capabilities. It is designed to work with PostGIS (slides).

pgpool-II is a middleware that offers parallel query, although I'm not sure if or how it can be configured for PostGIS.

Not the answer you're looking for? Browse other questions tagged or ask your own question.