Commit 41a1ea3c authored by Vincent Pelletier's avatar Vincent Pelletier

Fix bad query execution plan when executing SQL{Dict,Queue}_validateMessageList.

serialization_tag is checked for equality, but processing_node is checked for inequality.
So the right index column order is serialization_tag then processing_node.
serialization_tag is not used in a where-expression in any other zsqlmethod, so previous index can be removed to save space and insertion speed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24165 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 163fa9a9
...@@ -28,7 +28,7 @@ CREATE TABLE `message` ( ...@@ -28,7 +28,7 @@ CREATE TABLE `message` (
KEY (`method_id`), KEY (`method_id`),
KEY `processing_node_processing` (`processing_node`, `processing`), KEY `processing_node_processing` (`processing_node`, `processing`),
KEY `processing_node_date` (`processing_node`, `date`), KEY `processing_node_date` (`processing_node`, `date`),
KEY `processing_node_serialization_tag` (`processing_node`, `serialization_tag`), KEY `serialization_tag_processing_node` (`serialization_tag`, `processing_node`),
KEY (`priority`), KEY (`priority`),
KEY (`tag`), KEY (`tag`),
KEY (`order_validation_text`) KEY (`order_validation_text`)
......
...@@ -25,7 +25,7 @@ CREATE TABLE `message_queue` ( ...@@ -25,7 +25,7 @@ CREATE TABLE `message_queue` (
KEY (`method_id`), KEY (`method_id`),
KEY `processing_node_processing` (`processing_node`, `processing`), KEY `processing_node_processing` (`processing_node`, `processing`),
KEY `processing_node_date` (`processing_node`, `date`), KEY `processing_node_date` (`processing_node`, `date`),
KEY `processing_node_serialization_tag` (`processing_node`, `serialization_tag`), KEY `serialization_tag_processing_node` (`serialization_tag`, `processing_node`),
KEY (`priority`), KEY (`priority`),
KEY (`tag`) KEY (`tag`)
) TYPE = InnoDB; ) TYPE = InnoDB;
Markdown is supported
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