MySQL Forums
Forum List  »  Performance

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.

Waiting for ur comments,
Alex & Felix.

Options: ReplyQuote


Subject
Views
Written By
Posted
4862
December 13, 2004 11:06AM
Re: Implementing distance matrix 2500 X 2500
2647
December 14, 2004 12:08AM


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.