SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Script Library
 Dijkstra's Shortest Path Algorithm
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

daydreamer82
Starting Member

3 Posts

Posted - 04/11/2007 :  17:01:17  Show Profile  Reply with Quote
hello,

This algorithm is providential for me. Im a student experimenting path discovering on Internet. I succeeded to put some traceroute data into a mysql database. And now, i tried to find a way to find shortests paths...

Thanks a lot ;)



PS. If you have the mysql version ... ;)
Go to Top of Page

ramaju
Starting Member

1 Posts

Posted - 09/15/2007 :  21:18:55  Show Profile  Reply with Quote
daydremer82 did you find the mysql version?
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11750 Posts

Posted - 09/15/2007 :  21:21:18  Show Profile  Visit spirit1's Homepage  Reply with Quote
and what is stopping you from converting it to MySql version?
Lazyness?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30208 Posts

Posted - 09/16/2007 :  05:15:58  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Spirit1, do you think you can convert my original VB-code to an assembly for more speeed?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

spirit1
Cybernetic Yak Master

Slovenia
11750 Posts

Posted - 09/16/2007 :  09:51:20  Show Profile  Visit spirit1's Homepage  Reply with Quote
sure

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 09/16/2007 :  09:52:29  Show Profile  Reply with Quote
Foolish boy Peso. You didn't say "how much"
Go to Top of Page

dim5b
Starting Member

1 Posts

Posted - 01/12/2009 :  05:59:37  Show Profile  Reply with Quote
Any MySQL Version???
Go to Top of Page

KadirCan
Starting Member

Turkey
1 Posts

Posted - 09/19/2012 :  05:40:10  Show Profile  Reply with Quote
Hi Guys and SwePeso,

This acticle is really awesome. I implement that for my project and there is not problem beside performance.

i little bit modify the system. Paths and Nodes are static. There are 4222 nodes and 9258 paths. I am just execute the dbo.uspdijkstraresolve procedure for result.

Query execution time is about 16sec and it is really very low performance for my project.

Than i find some article that improving performance..
http://www.cs.uu.nl/docs/vakken/gd/jesper2.pdf

I have try to modify SwePeso's codes but there are lots of bugs i think.

Can you help me SwePeso to improve your codes performance?? it seems to be 20 times faster than Dijkstra on average..






Go to Top of Page

markus27183
Starting Member

1 Posts

Posted - 09/03/2013 :  10:32:49  Show Profile  Reply with Quote
This is less efficient than it could be. Assuming there are no negative costs, one may jump out of the first while loop when the destination node has been found, i.e. the first while loop starts:

DECLARE @found bit; SET @found = 0;

WHILE @NodeID IS NOT NULL AND @found = 0

and ends:

IF @NodeID = @DestNodeID SET @found = 1;

END
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000