On Wed, 02 Apr 2003 16:53:44 +0200, Grégoire Dubois <[EMAIL PROTECTED]> wrote:
>Creating the tree doesn't give me problem. Where I ask me some >questions, is the speed to get the whole tree from the database in a >recursive way. I've made a PHP script doing genealogical descendancy charts that does recursion on the application level. For an extreme example, look at <url:http://solumslekt.org/slekta/etterkommere.php?person=383> which lists a very prolific family in which I've done extensive research. I just ran it, and it lists 1100 spouses and descendants four levels deep in a little over 5 seconds. The query is somewhat optimised, as I check for the sex of the parent: if ($sex == 'M') $query = "select per_no, mother, sex from slekta where father = $p_no order by p_birth_date1"; elseif ($sex == 'F') $query = "select per_no, father, sex from slekta where mother = $p_no order by p_birth_date1"; The table has per_no as primary key, and is indexed on (father, mother). By the way, I wonder if there are other genealogy hackers here who'd like to collaborate on an open-source project. regards, -- Leif Biberg Kristensen http://solumslekt.org/ mail to leif at solumslekt dot org -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]