[pgrouting-users] pgRouting: Is it possible to do multiple (concurrent) Dijkstra/A*/A_shooting_star queries at a time?

Stephen Woodbridge woodbri at swoodbridge.com
Wed Jun 22 16:18:24 EDT 2011


Hi Neu,

Yes, you can have multiple connection to the data base and issue 
multiple queries. As for performance there are a lot of variables that 
com into play so there is no simple answer:

What is your coverage?
How long is your route in number of segments?
How good are *you* at optimizing Postgresql for performance?
How good it you hardware? memory? disk performance? cpu speed? etc
Have you optimized the pgRouting wrappers for your application?
How many requests to you need to service in what timeframes?
Have you considered setting up multiple postgresql/pgrouting servers 
behind a load balancer?

As you can see MOST of these question are not pgRouting specific!

pgRouting is a good general solution. Your use cases and performance 
requirements will drive you final solution.

-Steve

On 6/22/2011 1:21 PM, Neutralitet wrote:
> Hello!
>
> I have tried to post this question to gis.stackexchange.com
> <http://gis.stackexchange.com>, but there have been no answers.
>
> So, I have tried to post it to this mailing list:
>
>
>
> /Disclaimer: the author of the question is a novice in PostgreSQL and
> pgRouting./
>
> As I understand doing a shortest path query in pgRouting is a
> complicated SELECT underneath.
>
> And as I know unlike any UPDATE queries, SELECT queries in PostgreSQL
> can be done simultaneously, because they don't interfere with the the
> database integrity anyhow.
>
> If the above is correct, the question is:
>
> *Can I query pgRouting for shortest paths, for example, each 1
> millisecond and get the same timing results as in case with truly
> sequential shortest path queries? Is case 2 possible?*
>
> Usual case (1):
>
>     * [Time elapsed: 0 seconds]
>     * Query for shortest path A
>     * Get result for the shortest path A
>     * [Time elapsed: 1.5 seconds]
>     * Query for shortest path B
>     * Get result for the shortest path B
>     * [Time elapsed: 3 seconds]
>
> A case with simultaneous queries (2):
>
>     * [Time elapsed: 0 seconds]
>     * Query for shortest path A
>     * [Time elapsed: 0.001 seconds]
>     * Query for shortest path B
>     * Get result for the shortest path A
>     * [Time elapsed: 1.5 seconds]
>     * Get result for the shortest path B
>     * [Time elapsed: 1.5001 seconds]
>
>
>
>
> --
> Best regards,
> Neu
>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users



More information about the Pgrouting-users mailing list