Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have downloaded data for india as a dbf file then converted it using osm2po to make it routable but the problem is when i make any routing query it takes a lot of time around 300 seconds and these results are after indexing source, target and id columns. So anyone can please tell how to enhance speed of pgrouting algorithm, or which algorithm should be used, time under 5 seconds would be OK for me, thanks in advance

share|improve this question

marked as duplicate by PolyGeo, whuber Jun 30 '14 at 1:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Use search. There are many many same Questions. And usual ways are , limit data amount using bounding box or something similar. Use so big Shared Mem / work mem setting that moust of used routing fits in (not faster i none user scenario) . Use SSD for databse filesystem and fastest is use RAM disk for routing table. –  simplexio Mar 7 '14 at 12:07

3 Answers 3

If you have a normal computer and no SSD or sth. like that you won't get much better results. Using boundingboxes is misleading and sometimes quite wrong. Imagine a C-shaped route - from south Italy to south Greece e.g. osm2po 4.8.8 provides a new feature which I haven't tested with pgRouing but it might help a bit. Read this here to get a first impression what I mean. Enable useQuadTileOrder=true in the osm2po.config file and create the table again. Finally apply the clustering to the source column.

In addition you can cut your table into two pieces. One for the routing itself with columns like source, target, costs, etc. and another one for the geometry reconstruction after the route has been found.

Please report your results here in this thread. THX.

share|improve this answer

Our RW Net 4 routing algorithms easily beat those timings by a factor 1000 or more, depending upon a number of factors. Making it possible to reach timings well below the desired 5 seconds.

share|improve this answer

Try A* algorithm. That might satisfy your need

share|improve this answer
1  
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  SS_Rebelious Mar 16 '14 at 13:34
    
Sorry for replying so late, but thanks to this post gis.stackexchange.com/questions/69722/… i got my ans by simplexio –  Mawa Apr 23 '14 at 22:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.