From 6b280119834b27cdb0b681efb841996cfc078869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Wed, 27 May 2009 15:41:10 +0000 Subject: [PATCH] Rejigged the indexes on the closure table and reordered its fields. --- misc-scripts/ontology/sql/table.sql | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc-scripts/ontology/sql/table.sql b/misc-scripts/ontology/sql/table.sql index 8c42416f7b..526d48909f 100644 --- a/misc-scripts/ontology/sql/table.sql +++ b/misc-scripts/ontology/sql/table.sql @@ -61,13 +61,14 @@ CREATE TABLE closure ( closure_id INT UNSIGNED NOT NULL AUTO_INCREMENT, child_term_id INT UNSIGNED NOT NULL, parent_term_id INT UNSIGNED NOT NULL, - distance TINYINT UNSIGNED NOT NULL, subparent_term_id INT UNSIGNED, + distance TINYINT UNSIGNED NOT NULL, PRIMARY KEY (closure_id), - UNIQUE INDEX parent_child_idx - (parent_term_id, child_term_id, subparent_term_id), - INDEX child_distance_idx (child_term_id, distance) + UNIQUE INDEX child_parent_idx + (child_term_id, parent_term_id, subparent_term_id), + INDEX parent_subparent_idx + (parent_term_id, subparent_term_id) ); -- $Id$ -- GitLab