
Using parallel sequential scan in PostgreSQL - okket
https://rafiasabih.blogspot.com/2018/10/using-parallel-sequential-scan-in.html
======
mistrial9
PostGIS user here -- this feature makes a big difference on common workloads
for analysis (Ubuntu 1604, PG10).

a common case is a commmon table expression (CTE) as a filter with a spatial
test on the result set e.g.

with tmpset as (<select on a common attribute>) SELECT count(star), <spatial-
test> from 2GB_table GROUP BY <spatial-test> order by count(star) asc;

example run: gather Workers Planned: 12; Workers Launched 12 Parallel Seq Scan
on 2GB_table

shared_mem, work_mem set to 8GB or so.. other details on request.

~~~
durkie
do you have to do much tuning to trigger parallel queries? i'm also trying to
do this with PostGIS, and it looks like you kind of have to tweak costs and
fiddle with things a fair amount to get parallel queries to trigger:
[http://blog.cleverelephant.ca/2018/09/parallel-
postgis-3.htm...](http://blog.cleverelephant.ca/2018/09/parallel-
postgis-3.html)

------
samcheng
Seems like a very similar access pattern to Map Reduce.

It should be valuable for analytical workloads - do analytics databases like
Amazon Redshift support this kind of thing already?

