<div dir="ltr">Hi, Lars,<div><br></div><div>Thanks for suggestions.</div><div><br></div><div>Your execute parallel is very interesting.  Are there explanations or a documentation or a guide available?</div><div><br></div><div>Regards,</div><div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 28 Mar 2022 at 11:09, Lars Aksel Opsahl <<a href="mailto:Lars.Opsahl@nibio.no">Lars.Opsahl@nibio.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
>From: postgis-users <<a href="mailto:postgis-users-bounces@lists.osgeo.org" target="_blank">postgis-users-bounces@lists.osgeo.org</a>> on behalf of Shaozhong SHI <<a href="mailto:shishaozhong@gmail.com" target="_blank">shishaozhong@gmail.com</a>>Sent: Monday, March 28, 2022 11:42 AMTo: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>>Subject: Re: [postgis-users] Cut extent box2d into
 small regular boxes, and iterate through each box of features
<div>>Hi, Lars,</div>
<div>></div>
<div>>Would the following alternative work?</div>
<div>></div>
<div>>In PostGIS, one can group by geometry.  Based on this information, can grid be generated?  so that grid with 0 features can be skipped.</div>
<div>></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
In our cases this would not solve our problems, because grid cells with zero content does not cause any big performance issue problems, but we do not need them so it's nice to get reed of them.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
But I think it's easier to have a complete grids coverage and instead vary cell size based on content. If you have a set of 10 mill polygons and and you make a grid so you can process them in parallel  what's important is that each job has about the same needs
 related to memory and CPU, and this can be done by setting for instance a max a value for number of features pr cell. (You can here also count number points in each polygon but that takes more time and you can not base the grid cell creation on indexes)
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Lars<br>
</div>
<span></span>
</div>

_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>