[BioSQL-l] index changes on the phylodb module

Hilmar Lapp hlapp at gmx.net
Tue Jun 12 00:04:24 UTC 2007


It turns out that ITIS has duplicate node labels (i.e., taxon names)  
in their taxonomy (they don't all have the same validity attribute  
though). I suppose that many other data providers for trees won't  
satisfy this constraint either, so I propose to remove it by default.  
I'll leave it in as a commented out configuration option.

I also needed to add more indexes to efficiently support some  
queries, especially those needed in precomputing the optimization  
structures for trees.

The migration path is:

-- using the default naming scheme for Pg:
ALTER TABLE node DROP CONSTRAINT node_label_key;
-- simple index on label to support searching nodes by label
CREATE INDEX node_i1 ON node (label);

-- other indexes needed for better query performance:
CREATE INDEX node_i2 ON node (tree_id);
CREATE INDEX edge_i1 ON edge (parent_node_id);
CREATE INDEX node_path_i1 ON node_path (parent_node_id);

	-hilmar
-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================








More information about the BioSQL-l mailing list