Skip to content
Snippets Groups Projects
Commit e8abdcae authored by Glenn Proctor's avatar Glenn Proctor
Browse files

Added extra indices to *_attrib tables to improve performance of certain queries.

parent c3d22365
No related branches found
No related tags found
No related merge requests found
# patch_40_41_f
#
# title: attrib tavle indices
#
# description:
# Add extra indices to attrib tables to improve performance.
ALTER TABLE misc_attrib ADD INDEX val_only_idx (value(40));
ALTER TABLE seq_region_attrib ADD INDEX val_only_idx (value(40));
ALTER TABLE gene_attrib ADD INDEX val_only_idx (value(40));
ALTER TABLE transcript_attrib ADD INDEX val_only_idx (value(40));
ALTER TABLE translation_attrib ADD INDEX val_only_idx (value(40));
# patch identifier
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_f.sql|attrib_indices');
......@@ -868,6 +868,7 @@ INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_b.sql|info
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_c.sql|xref_priority');
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_d.sql|ditag_primary_key_type');
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_e.sql|schema_version');
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_40_41_f.sql|attrib_indices');
################################################################################
#
......@@ -993,6 +994,7 @@ CREATE TABLE misc_attrib (
value TEXT NOT NULL DEFAULT '',
KEY type_val_idx (attrib_type_id, value(40)),
KEY val_only_idx (value(40)),
KEY misc_feature_idx (misc_feature_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
......@@ -1010,6 +1012,7 @@ CREATE TABLE translation_attrib (
value TEXT NOT NULL DEFAULT '',
KEY type_val_idx (attrib_type_id, value(40)),
KEY val_only_idx (value(40)),
KEY translation_idx (translation_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
......@@ -1026,6 +1029,7 @@ CREATE TABLE transcript_attrib (
value TEXT NOT NULL DEFAULT '',
KEY type_val_idx (attrib_type_id, value(40)),
KEY val_only_idx (value(40)),
KEY transcript_idx (transcript_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
......@@ -1043,6 +1047,7 @@ CREATE TABLE gene_attrib (
value TEXT NOT NULL DEFAULT '',
KEY type_val_idx (attrib_type_id, value(40)),
KEY val_only_idx (value(40)),
KEY gene_idx (gene_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
......@@ -1060,6 +1065,7 @@ CREATE TABLE seq_region_attrib (
value TEXT NOT NULL DEFAULT '',
KEY type_val_idx (attrib_type_id, value(40)),
KEY val_only_idx (value(40)),
KEY seq_region_idx (seq_region_id)
) COLLATE=latin1_swedish_ci TYPE=MyISAM;
......
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