[pgrouting-users] Newbie pgr_dijkstra performance question

Daniel Kastl daniel at georepublic.de
Fri Jan 24 08:23:11 PST 2014


Hi Andrew,

See answers inline:

>
> My test dataset is the Ordnance Survey Meridian roads dataset for Great
> Britain which has ~1.2 million edges.
>
> I can successfully use the pgr_dijkstra function to generate routing, but
> the performance seems a little slow. My test route takes around 10 seconds
> to return in pgAdminIII, and so my first question is whether this is about
> what I should be expecting. I am not pre-filtering the ways being passed to
> pgr_dijkstra using a bounding box or such like

This might be realistic, if you don't restrict your data by bbox
extent for example. pgRouting gets faster in general as less data you
select.


>
> The second question is that whilst exploring the performance, I removed the
> indexes that pgr_createtopology had built on the source and target fields of
> the road data. To my surprise, this had no effect whatsoever on the
> performance of pgr_dijkstra, and after rebuilding them and looking at the
> index stats in pgAdminIII, this is reporting no usage of the indexes at all
> (I did rerun some routing queries after rebuilding the indexes!). Again, is
> this expected? It seems to contradict the recommendation to build the
> indexes in the pgr workshop:
> http://workshop.pgrouting.org/chapters/topology.html#add-indices
>

Did you run "VACUUM ANALYZE" afterwards?
If that information is missing in the workshop, then it should be added.

Regards,
Daniel

-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de


More information about the Pgrouting-users mailing list