[pgpointcloud] PC_Get array of dimensions
Regina Obe
lr at pcorp.us
Tue May 8 05:45:49 PDT 2018
Lars,
Have you tried using LATERAL for this. This seems like an example just
dying for that to be used.
For example
SELECT PC_Get(pae, 'X') AS X, PC_Get(pae, 'Y') AS Y, PC_GET(pae, 'Z') As Z
FROM import , LATERAL PC_Explode(import.pa) AS pae
WHERE PC_Intersects(...);
From: pgpointcloud [mailto:pgpointcloud-bounces at lists.osgeo.org] On Behalf
Of Lars
Sent: Tuesday, May 08, 2018 5:32 AM
To: pgpointcloud at lists.osgeo.org
Subject: [pgpointcloud] PC_Get array of dimensions
Hello,
Does pgpointcloud have any plans to add a generic PC_Get function that
accepts an array of input names? There was a discussion on the subject a
while back but cannot see any new function.
http://lists.osgeo.org/pipermail/pdal/2014-November/000429.html
The suggested function would make the query more compact and easier to read.
Could it also improve performance?
A simple query without PC_Get/PC_Explode takes 1 ms.
select id from import where PC_Intersects(...);
Updating the test to include X value and the time increases to 21 ms.
select PC_Get(PC_Explode(pa), 'X') from import where PC_Intersects(...);
Updating the test to include X and Y and it takes 34ms.
select PC_Get(PC_Explode(pa), 'X'), PC_Get(PC_Explode(pa), 'Y') from import
where PC_Intersects(...);
Updating the test to include X,Y and Z and it takes 46ms.
select PC_Get(PC_Explode(pa), 'X'), PC_Get(PC_Explode(pa), 'Y'),
PC_Get(PC_Explode(pa), 'Z') from import where PC_Intersects(...);
It appear that for each dimension added the time increase quiet a bit. This
is obviously a very simple test but just wanted to get a feedback.
Using Windows 7, PostgresSQL 10.3 and PostGIS 2.4.4
kind regards, Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20180508/bb729426/attachment.html>
More information about the pgpointcloud
mailing list