Definitely pull the data out into an array with one large
query. It'll be much faster than the thousands/millions
of queries you'd be generating otherwise. Graph-theory
problems like this go exponential really fast.
Rene
At 02:05 PM 8/20/01, you wrote:
>Hans Zaunere wrote:
>>Maybe it's just me, but it sounds like you need to
>>reconsider you're database structure. I can't think
>>of any reason that such a schema would be required.
>
>It's simply a database of locations on the globe, and I need to calculate how to get
>to one place from another using any locations in between. The database layout is one
>simple table with all of the point info, such as latitude and longitude, on each
>record.
>
>The recursive calculation to search all possible routes and pick the best one isn't
>too hard, I'm just worried that the number of database queries all at one time as the
>function digs down into itself might overload the server.
--
René Churchill [EMAIL PROTECTED]
Vermont Web Wizard, LLC 802-244-5151
Specializing in Web Programming 802-244-5512 (fax)
http://www.vtwebwizard.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php