[Small note: The author of this question is familiar with PostGIS, but is not familiar with C language]<br><br>I have a &#39;ways&#39; table in PostGIS consisting of about 90,000 ways. When I do a pgRouting shortest path query it takes about 2,5 seconds to get the result.<br>
<br>I was pretty unsatisfied with it (I would like it to be about 1 second for my imagined user) so I tried to do a &#39;select * from ways&#39; query in psql with \timing enabled. It took 3 seconds to respond. When I did &#39;select name, length, x1, y1, x2, y2 from ways&#39; (that is all needed to build a graph in my opinion) it took even more - 4 seconds to respond.<br>
<br>Based on that, I assume that pgRouting&#39;s SQL queries are somehow optimized. <br><br>The questions:<br>1. Is it possible to improve the speed of pgRouting queries?<br>2. How is the actual shortest path calculation done? Is it anything like the following:<br>
- Load the whole ways/edges table into memory with one &#39;select * from ways&#39;;<br>- Build a graph from that;<br>- Apply a C-based shortest path algorithm to the graph;<br>- Return a result into psql server?<br><br><br>
Can any of these steps be improved anyhow?<br><br>Thank you!<br>