I need to develop the shortest path routing query in PostgreSQL. I have my own map data that is a shapefile. From that shapefile I have made PostgreSQL database. It is a large database with around 60k entries. I have made one edge table from the dataset and then created the topology. Lastly tried with astar and dijkstra algorithm (pgr_astar and pgr_dijkstra). It is giving the shortest path but the pgr_astar or pgr_dijkstra query takes at least 3 to 4 sec to provide the result. But I need it faster, may be in msec.
There are lots of applications with routing in market and in those cases routing results come within fraction of seconds. What are the tricks to make it faster?
I have checked a few tricks to speed up. There are highway hierarchies, busy node hierarchies. But I can't use these to my application as most of my roads are forest roads. And my start and/or destination point is a point somewhere in between forests; not a city centre of a big city (so, not a busy node).
I tried to generate clusters and then to pre-compute routes between clusters. But thus the database is growing significantly. So, I am not sure whether it will increase the speed or not.
Can you give any more easy idea to solve this problem?