pgRouting

Forum #23 - Topic #19 - Message List

pgRouting and huge base

Hello,

I try to use pgRouting on an one million edges graph. It works well, exept the computing time is very long, about 3 minutes. I have tried shortest_path, shortest_path_astart,... I changed several parameters in postgres.cong, I use pgrouting 1.0.0 on windows XP, postgres 8.2. And I got always the same result about 3 minutes to calculate a 25km long path. Does someone get the same problem, and has a solution ? Thanks in advance.

  • Message #60

    Rick,

    It is normal for such big dataset.

    Try to look at routing_postgis.sql file - there are a lot of wrapper functions which don't load entire data (for example shortest_path_astar1_as_geometry_internal_id or shortes_path_dijkstra1_as_geometry_internal_id)

    • Message #64

      What range of computation time can I expect on a 6 millons edges graph ? Few minutes or few seconds ? Of course, it's possible to use the A*1 functions or another one which reduce the loaded graph, but it's work only when the distance from the departure and the arrival is short. When this distance is long, the wrapper functions load about the complete graph. I have heard that a benchmark was done on japanese roads (about 2 miilions edges) few years ago. Does somebody remember the result ?

      Thanks for your help.

      • Message #65

        Hi Rick,

        Well, computation time depends not only on graph size, but also on hardware specs, edges ordering, table's indexes etc.

        We did some benchmarks with Japan data and we found out that it is better to use Dijkstra algorithm if you want to load entire graph, but anyway it took few dozen seconds to calculate a path.

        If A*1-like functions don't work for your case, you need to think on how to reduce the number of edges in other way (data layering for example).

        • Message #67

          Thanks Anton, for this input.

          I will try asap

          Regards