[pgpointcloud] PC_Get array of dimensions

Éric Lemoine eric.lemoine at oslandia.com
Wed May 9 03:41:13 PDT 2018


On Wed, 2018-05-09 at 04:22 -0400, Regina Obe wrote:
> That's surprising.  It should have had a significant performance gain
>  though it's possible the PostgreSQL 10 rewrote your original so it
> ends up following the lateral construct.
> I think older versions just end up calling PC_Explode multiple times.


It looks like there is a significant per-PC_Get cost:

lopocs=# /timing
lopocs=# select pc_get(pae, 'x') from (select pc_explode(points) pae
from inrap limit 100000) t;
Time: 225.342 ms
lopocs=# select pc_get(pae, 'x'), pc_get(pae, 'y') from (select
pc_explode(points) pae from inrap limit 100000) t;
Time: 331.342 ms
lopocs=# select pc_get(pae, 'x'), pc_get(pae, 'y'), pc_get(pae, 'z')
from (select pc_explode(points) pae from inrap limit 100000) t;
Time: 426.759 ms
lopocs=# select pc_get(pae, 'x'), pc_get(pae, 'y'), pc_get(pae, 'z'),
pc_get(pae, 'NumberOfReturns'), pc_get(pae, 'Classification'),
pc_get(pae, 'UserData'), pc_get(pae, 'PointSourceId'), pc_get(pae,
'Green'), pc_get(pae, 'Red'), pc_get(pae, 'Blue'), pc_get(pae,
'GpsTime') from (select pc_explode(points) pae from inrap limit 100000)
t;
Time: 926.485 ms

I use Postgres 9.6.5 in these tests.


-- 
Éric Lemoine
Oslandia
+33 1 86 95 95 55
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/pgpointcloud/attachments/20180509/49d27c74/attachment.sig>


More information about the pgpointcloud mailing list