Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binary tree very slow!
Message
De
31/10/1997 09:44:32
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Binary tree very slow!
Divers
Thread ID:
00057594
Message ID:
00057594
Vues:
113
Hi

I have implemented a binary tree in a table using at least the following three fields: id, left and right where id is the node identification and left and right are children of the node. Each child can point to another node id of the same table using its identification number. I used 0 when there is no child.

I Created a class to iterate on that three using postfix search but it is not very performant. For a tree that has only 64 nodes, it takes about 5 seconds to do only a postfix search for each node without doing any piece of code during the search. A GOTO statement is used each time a child must be visited resulting of a lots of disk access. I know that the search time must increase as the tree growth but I can't live with a very poor performance like that.

Is there a way to improve performance significantly using my tree implementation ?

Is there any other way faster to implement a tree in a data base environment ?

thanks in advance
François Guay
EMail: fraguay@videotron.ca
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform