MySQL Forums

Re: Implementing distance matrix 2500 X 2500
Posted by: Felix John
Date: December 14, 2004 12:08AM

Hi Basile STARYNKEVITCH,

But then we will end up in a table having 6250000 rows ( 2500 * 2500 ) .

According to you the table might look something like this,

x Y Distance
------------------------

1 1 0Km

1 2 1km

1 3 3km
. .
. .
. .
1 2500 5km
--------------------

2 1 4km
2 2 3km
. .
. .
. .
2 2500 5km

-------------------------

likewise it goes on until 2500.

Will a query like find all y where x == 1 and Distance == 3 scan all the 6250000 rows ?????.

Is it efficient to split this (2500 * 2500 = 6250000 rows) table into 2500 seperate tables of 2500 rows each ?????.

What do you think on an idea like this,

A table with 2500 columns and 2500 rows exactly like a distance matrix.

1 2 3 4 .... 2500
-------------------------------------------

1 1km 3km 2km 5km 1km

2 7km 1km 5km 8km 5km

3 1km 4km 6km . .

. . . . . .
. . . . . .
. . . . . .

2500 3km 6km 30km 4km 5km

What do u think on this Basile STARYNKEVITCH ????

Is it efficient to maintain a matrix like this whose column size will be 2500 and the row size to 2500.

Itz pretty urgent so mail us as soon as possible.

Alex & Felix.

Subject
Views
Written By
Posted
4873
December 13, 2004 11:06AM
2622
December 13, 2004 02:46PM
Re: Implementing distance matrix 2500 X 2500
2653
December 14, 2004 12:08AM
2301
December 14, 2004 12:14AM
2217
December 14, 2004 12:22AM
2369
December 14, 2004 12:30AM
2365
December 14, 2004 02:11AM
2287
December 14, 2004 08:20AM
2348
December 14, 2004 02:53AM
2204
December 14, 2004 08:25AM
2285
December 14, 2004 08:43AM
2298
December 21, 2004 01:54PM
3851
December 15, 2004 01:26PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.