[repository] Drop the index on entities.type
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 17 Oct 2016 14:50:47 +0200
changeset 11776 b49684ddd543
parent 11775 39cf9e55ada8
child 11777 5b535fe2f364
[repository] Drop the index on entities.type It should be now only used in maintenance queries in checkintegrity. Those are not worth maintaining it. Closes #15538317
cubicweb/misc/migration/3.24.0_Any.py
cubicweb/server/checkintegrity.py
cubicweb/server/sources/native.py
--- a/cubicweb/misc/migration/3.24.0_Any.py	Thu Oct 06 12:11:23 2016 +0200
+++ b/cubicweb/misc/migration/3.24.0_Any.py	Mon Oct 17 14:50:47 2016 +0200
@@ -6,5 +6,6 @@
 sql('DROP TABLE moved_entities')
 sql('ALTER TABLE entities DROP COLUMN asource')
 sql('ALTER TABLE entities DROP COLUMN extid')
+sql('DROP INDEX entities_type_idx')
 
 drop_entity_type('CWSourceSchemaConfig')
--- a/cubicweb/server/checkintegrity.py	Thu Oct 06 12:11:23 2016 +0200
+++ b/cubicweb/server/checkintegrity.py	Mon Oct 17 14:50:47 2016 +0200
@@ -413,7 +413,6 @@
 
 SYSTEM_INDICES = {
     # see cw/server/sources/native.py
-    'entities_type_idx': ('entities', 'type'),
     'transactions_tx_time_idx': ('transactions', 'tx_time'),
     'transactions_tx_user_idx': ('transactions', 'tx_user'),
     'tx_entity_actions_txa_action_idx': ('tx_entity_actions', 'txa_action'),
--- a/cubicweb/server/sources/native.py	Thu Oct 06 12:11:23 2016 +0200
+++ b/cubicweb/server/sources/native.py	Mon Oct 17 14:50:47 2016 +0200
@@ -1322,7 +1322,6 @@
   eid INTEGER PRIMARY KEY NOT NULL,
   type VARCHAR(64) NOT NULL
 );;
-CREATE INDEX entities_type_idx ON entities(type);;
 
 CREATE TABLE transactions (
   tx_uuid CHAR(32) PRIMARY KEY NOT NULL,