Skip to content
Snippets Groups Projects
Commit 6b280119 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Rejigged the indexes on the closure table and reordered its fields.

parent 19c5dc2d
No related branches found
No related tags found
No related merge requests found
......@@ -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$
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment