<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">For fairly complex reasons having to do with the ST_Intersects() function being an inlined SQL function. <div class=""><br class=""></div><div class=""><a href="https://carto.com/blog/postgres-parallel/" class="">https://carto.com/blog/postgres-parallel/</a></div><div class=""><br class=""></div><div class="">The issues are fixed in Pg12 / PostGIS 3, but older combinations will be fiddly to parallelize, as you’ve found.</div><div class=""><br class=""></div><div class="">P.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 25, 2019, at 7:14 AM, Lars Aksel Opsahl <<a href="mailto:Lars.Opsahl@nibio.no" class="">Lars.Opsahl@nibio.no</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Hi</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">In the  first sql below we just use "<span style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant-caps: normal; background: var(--white);" class="">ST_Intersects(r1.geo,r2.geo)", </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background: var(--white);" class="">in the second SQL we add  <span style="font-family: Monaco; font-size: 11px; font-style: normal; font-variant-caps: normal; background: var(--white);" class="">"r1.geo && r2.geo" </span></span></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">The second sql executes 3 times faster probably because of parallel seems to kick in. (if we adjust parallell settings we can get the second SQL to run 6. times faster)</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">Why is this happening when I just add<span class="Apple-converted-space"> </span><span style="caret-color: rgb(0, 0, 0); font-family: Monaco; font-size: 11px; background-color: rgb(255, 255, 255); display: inline !important;" class="">"r1.geo && r2.geo" </span>?</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class="">I have ran <span style="background: var(--white);" class="">ANALYZE</span> on the table  before running the tests and there are indexes on geo and gid.</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">Indexes:</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="">   <span class="Apple-converted-space"> </span></span>"markslag_myrikilden_temp_gid_idx" UNIQUE, btree (gid)</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><span class="">   <span class="Apple-converted-space"> </span></span>"geoidx__markslag_myrikilden_temp___gist" gist (geo)</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""><br class=""></span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">We run on</span></div><p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span></p><p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class=""></span></p><ul class=""><li class=""><span style="background: var(--white);" class="">PostgreSQL 11.5 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-</span><span style="background: var(--white);" class="">36), 64-bit</span><br class=""></li><li class=""><span style="background: var(--white);" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures;" class="">POSTGIS="2.5.3 r17699" [EXTENSION] PGSQL="110" GEOS="3.8.0dev-CAPI-1.12.0 " SFCGAL="1.3.7" PROJ="Rel. 6.2.0, September 1st, 2019" GDAL="GDAL 3.1.0dev-7a9a0f4-dirty, released 2019/99/99" LIBXML="2.9.1" TOPOLOGY RASTER</span></div></span></li></ul></div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">1. SQL :</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">EXPLAIN ANALYZE</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">select</span><span class="Apple-converted-space"> </span>atil, myr, myrtype,myromdanning,myrtypetext,myromdanningtext, ST_Collect(geo)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">as</span><span class="Apple-converted-space"> </span>geo<span class=""> </span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(127, 0, 85);" class="">from<span style="" class=""><span class="Apple-converted-space"> </span>(</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">select</span><span class="Apple-converted-space"> </span>r1.gid, r1.atil, r1.myr, r1.myrtype,r1.myromdanning,r1.myrtypetext,r1.myromdanningtext,r1.geo,<span class="Apple-converted-space"> </span><span style="color: rgb(64, 0, 200);" class="">true</span><span class="Apple-converted-space"> </span>doUnion</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">from</span><span class="Apple-converted-space"> </span>sde_markslag.markslag_myrikilden_temp r1,<span class=""> <span class="Apple-converted-space"> </span></span>sde_markslag.markslag_myrikilden_temp r2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">where</span><span class="Apple-converted-space"> </span>ST_Intersects(r1.geo,r2.geo)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">and</span><span class="Apple-converted-space"> </span>r1.gid != r2.gid</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">as</span><span class="Apple-converted-space"> </span>r</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">group</span><span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">by</span><span class="Apple-converted-space"> </span>atil, myr, myrtype,myromdanning,myrtypetext,myromdanningtext;</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(64, 128, 128);" class="">-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>HashAggregate<span class=""> <span class="Apple-converted-space"> </span></span>(cost=10519178.25..10519180.65<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=192 width=46) (actual<span style="color: rgb(127, 0, 85);" class="">time</span>=185774.300..187207.628<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=163 loops=1)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">  <span class="Apple-converted-space"> </span></span>Group Key: r1.atil, r1.myr, r1.myrtype, r1.myromdanning, r1.myrtypetext, r1.myromdanningtext</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">  <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Nested Loop<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.29..9169289.37<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=77136507 width=1612) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.680..183087.904<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=721668 loops=1)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">        <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Seq Scan<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">on</span><span class="Apple-converted-space"> </span>markslag_myrikilden_temp r1<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.00..59170.91<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=567241 width=1616) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.021..640.233<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=567241 loops=1)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">        <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Index Scan<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">using</span><span class="Apple-converted-space"> </span>geoidx__markslag_myrikilden_temp___gist<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">on</span>markslag_myrikilden_temp r2<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.29..15.87<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=19 width=1602) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.257..0.317<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=1 loops=567241)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">              <span class="Apple-converted-space"> </span></span>Index Cond: (r1.geo && geo)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">              <span class="Apple-converted-space"> </span></span>Filter: ((r1.gid <> gid)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">AND</span><span class="Apple-converted-space"> </span>_st_intersects(r1.geo, geo))</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">              <span class="Apple-converted-space"> </span></span>Rows Removed<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">by</span><span class="Apple-converted-space"> </span>Filter: 2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>Planning Time: 4.800 ms</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>Execution Time: 187214.730 ms</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">(10<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">Time: 187231.267 ms (03:07.231)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">2. SQL :</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">EXPLAIN ANALYZE</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">select</span><span class="Apple-converted-space"> </span>atil, myr, myrtype,myromdanning,myrtypetext,myromdanningtext, ST_Collect(geo)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">as</span><span class="Apple-converted-space"> </span>geo<span class=""> </span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(127, 0, 85);" class="">from<span style="" class=""><span class="Apple-converted-space"> </span>(</span></div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">select</span><span class="Apple-converted-space"> </span>r1.gid, r1.atil, r1.myr, r1.myrtype,r1.myromdanning,r1.myrtypetext,r1.myromdanningtext,r1.geo,<span class="Apple-converted-space"> </span><span style="color: rgb(64, 0, 200);" class="">true</span><span class="Apple-converted-space"> </span>doUnion</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">from</span><span class="Apple-converted-space"> </span>sde_markslag.markslag_myrikilden_temp r1,<span class=""> <span class="Apple-converted-space"> </span></span>sde_markslag.markslag_myrikilden_temp r2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">where</span><span class="Apple-converted-space"> </span>r1.geo && r2.geo<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">and</span><span class="Apple-converted-space"> </span>ST_Intersects(r1.geo,r2.geo)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">and</span><span class="Apple-converted-space"> </span>r1.gid != r2.gid</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">as</span><span class="Apple-converted-space"> </span>r</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span style="color: rgb(127, 0, 85);" class="">group</span><span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">by</span><span class="Apple-converted-space"> </span>atil, myr, myrtype,myromdanning,myrtypetext,myromdanningtext;</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; color: rgb(64, 128, 128);" class="">-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>HashAggregate<span class=""> <span class="Apple-converted-space"> </span></span>(cost=243692.31..243694.71<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=192 width=46) (actual<span style="color: rgb(127, 0, 85);" class="">time</span>=62439.948..63863.421<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=163 loops=1)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">  <span class="Apple-converted-space"> </span></span>Group Key: r1.atil, r1.myr, r1.myrtype, r1.myromdanning, r1.myrtypetext, r1.myromdanningtext</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">  <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Gather<span class=""> <span class="Apple-converted-space"> </span></span>(cost=1000.28..242721.48<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=55476 width=1612) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=1.519..59526.211<span style="color: rgb(127, 0, 85);" class="">rows</span>=721668 loops=1)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">        <span class="Apple-converted-space"> </span></span>Workers Planned: 2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">        <span class="Apple-converted-space"> </span></span>Workers Launched: 2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">        <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Nested Loop<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.29..236173.88<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=23115 width=1612) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.583..59945.673<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=240556 loops=3)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">              <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Parallel Seq Scan<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">on</span><span class="Apple-converted-space"> </span>markslag_myrikilden_temp r1<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.00..55862.00<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=236350 width=1616) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.013..260.552<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=189080 loops=3)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">              <span class="Apple-converted-space"> </span></span>-><span class=""> <span class="Apple-converted-space"> </span></span>Index Scan<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">using</span><span class="Apple-converted-space"> </span>geoidx__markslag_myrikilden_temp___gist<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">on</span>markslag_myrikilden_temp r2<span class=""> <span class="Apple-converted-space"> </span></span>(cost=0.29..0.75<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=1 width=1602) (actual<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">time</span>=0.252..0.311<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>=1 loops=567241)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">                    <span class="Apple-converted-space"> </span></span>Index Cond: ((r1.geo && geo)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">AND</span><span class="Apple-converted-space"> </span>(r1.geo && geo))</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">                    <span class="Apple-converted-space"> </span></span>Filter: ((r1.gid <> gid)<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">AND</span><span class="Apple-converted-space"> </span>_st_intersects(r1.geo, geo))</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class="">                    <span class="Apple-converted-space"> </span></span>Rows Removed<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">by</span><span class="Apple-converted-space"> </span>Filter: 2</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>Planning Time: 7.791 ms</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class=""><span class=""> </span>Execution Time: 63871.265 ms</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">(13<span class="Apple-converted-space"> </span><span style="color: rgb(127, 0, 85);" class="">rows</span>)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco;" class="">Time: 63886.211 ms (01:03.886)</div><div style="margin: 0px; font-style: normal; font-variant-caps: normal; font-weight: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Monaco; min-height: 15px;" class=""><br class=""></div><br class="">Lars</div><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;" class=""><br class=""></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">postgis-users mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="mailto:postgis-users@lists.osgeo.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">postgis-users@lists.osgeo.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></div></blockquote></div><br class=""></div></body></html>