<div dir="ltr">Hi Folks, <div><br></div><div>I am trying to create a benchmark to compare PostGIS against Apache Spark performance, in SpatialQuery capabilties for sure. </div><div><br></div><div>I have expected that spark will outperfom, since the data resides in memory, unlike PostGIS. However, I am more interested in using PostGIS, for the sake of the <b>rich geometric predicates & functions. </b></div><div><b><br></b></div><div>However, I have tried to load 6GB only of data into a table, and trying a join query with another table. Specifically <b>ST_Within. </b></div><div><br></div><div>Surprisingly, PostGIS was unable to finish the query, for <b>limit > 1000000 . </b></div><div><b><br></b></div><div>In other words, as long as I limit my query result from <b>10 till 10000000, </b>the query return result. However, more than this, the query never return, I have waited for <b>50 </b>minutes on AWS EC2 Instance, with 4 cores & 16 GB, and <b>nothing !!</b></div><div><b><br></b></div><div>I have tried to use Vaccum_Verbose & analyze, the same issue remained. </div><div><br></div><div>Would like to hear any suggestions to solve the problem </div><div><br></div><div>Thanks in advance.</div></div>