[postgis-users] Performance external loop, WHERE IN (values), stored procedure or else to pass data to SQL query
Michal Seidl
michal.seidl at gmail.com
Thu Jun 23 04:16:54 PDT 2016
Hi,
thanks for advice. CTE looks like the solution for me. I did not measure
any performance but it is obviously better than test each point in a loop.
M
On 06/13/2016 08:46 PM, Leknín Řepánek wrote:
> Python Array -> geometry(POINT, [SRID])[] -> unnest, you can use unnest
> in CTE
> something like
>
> WITH cte AS (
> SELECT unnest(array['POINT(1 1)'::geometry ......]) pnt
> )
> SELECT * FROM t JOIN cte ON ST_....
>
>
> Milions of points aren`t big data, if it is slow, maybe you should check
> your indexes.
>
More information about the postgis-users
mailing list