<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi!</div><div><br></div><div>I am looking to increase the performance of the uploading process with pgpointcloud and pqxx. <br></div><div><br></div><div>After a bit of profiling and playing around I have seen that with the documentation on the README, by appending a huge string and then  executing the sql code like this:</div><div><br></div><span style="font-family:monospace,monospace">...<br>pqxx::work work(conn);<br>std::string command ("<br>INSERT INTO patches (pa) SELECT PC_MakePatch (1, ARRAY[")<br><br>for(auto& point : point_vector){<br>    command += std::to_string(point.x);<br>    command += ", "<br>    command += std::to_string(point.y);<br>    command += ", "<br>    command += std::to_string(point.z);<br>    command += ", "<br>    command += std::to_string(point.i);<br>    command += ", "<br>}<br>command += "]));)");"<br>work.exec(command);<br>...</span><div><div><code><br></code></div><div><code>Is there a more efficient method. I feel doing everything from strings should not be</code></div><div><code>faster. And the code above scales horribly with bigger point clouds. <br></code></div><div><code><br></code></div><div><code><br></code></div><div><code>Also, I have tried to see what the guys at PDAL are doing and I think **of course** they are doing much better than me :P. Any code sample or read regarding this topic would be appreciated. <br></code></div><div><code><br></code></div><div><code><br></code></div><div><code>Thank you in advance. <br></code></div><div><code></code><code></code><code></code></div></div><span style="font-family:monospace,monospace"></span><br><span style="font-family:monospace,monospace"></span><div><span style="font-family:monospace,monospace"><br></span></div><div><div><div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><b>David Serret </b>- R&D Engineer at Eigen Dynamics SL<br><img src="http://www.eigendynamics.com/wp-content/uploads/2017/02/EigenLogo200dpi-1.jpg" width="200" height="88"></div></div></div></div></div></div></div></div>