Commit f9cd31cc authored by Aurel's avatar Aurel

many catalog optimisations

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18475 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 99fe51b4
......@@ -135,12 +135,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
......@@ -96,16 +96,16 @@
<key> <string>_keys</string> </key>
<value>
<list>
<string>isMovement</string>
<string>isAccountable</string>
<string>uid</string>
<string>getStopDate</string>
<string>getBaobabDestinationUid</string>
<string>getBaobabDestinationSectionUid</string>
<string>getResourceUid</string>
<string>getVariationText</string>
<string>getSimulationState</string>
<string>getAggregateUidList</string>
<string>isMovement</string>
<string>isAccountable</string>
<string>uid</string>
<string>getStopDate</string>
<string>getBaobabDestinationUid</string>
<string>getBaobabDestinationSectionUid</string>
<string>getResourceUid</string>
<string>getVariationText</string>
<string>getSimulationState</string>
<string>getAggregateUidList</string>
</list>
</value>
</item>
......@@ -114,12 +114,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
<catalog_method>
<item key="sql_catalog_object_list" type="int">
<value>1</value>
</item>
<item key="_is_filtered_archive" type="int">
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isMovement</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
</catalog_method>
\ No newline at end of file
......@@ -29,12 +29,6 @@
<key> <string>_data</string> </key>
<value>
<dictionary>
<item>
<key> <string>event_state</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getCreationDate</string> </key>
<value>
......@@ -47,18 +41,6 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>getDestinationReference</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getFloatIndex</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getIntIndex</string> </key>
<value>
......@@ -107,12 +89,6 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>getSimulationStateTitle</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>getSourceReference</string> </key>
<value>
......@@ -150,7 +126,7 @@
</value>
</item>
<item>
<key> <string>getValidationStateTitle</string> </key>
<key> <string>getViewPermissionOwner</string> </key>
<value>
<dictionary/>
</value>
......@@ -167,18 +143,6 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>meta_type</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>payment_state</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>security_uid</string> </key>
<value>
......@@ -200,26 +164,20 @@
<list>
<string>uid</string>
<string>security_uid</string>
<string>getViewPermissionOwner</string>
<string>getPath</string>
<string>getRelativeUrl</string>
<string>getParentUid</string>
<string>id</string>
<string>getDescription</string>
<string>getTitle</string>
<string>meta_type</string>
<string>getPortalType</string>
<string>getSimulationState</string>
<string>getSimulationStateTitle</string>
<string>getValidationState</string>
<string>getValidationStateTitle</string>
<string>payment_state</string>
<string>event_state</string>
<string>getReference</string>
<string>getSourceReference</string>
<string>getDestinationReference</string>
<string>getStringIndex</string>
<string>getIntIndex</string>
<string>getFloatIndex</string>
<string>hasCellContent</string>
<string>getCreationDate</string>
<string>getModificationDate</string>
......@@ -233,12 +191,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......@@ -249,26 +201,20 @@
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
security_uid\r\n
getViewPermissionOwner\r\n
getPath\r\n
getRelativeUrl\r\n
getParentUid\r\n
id\r\n
getDescription\r\n
getTitle\r\n
meta_type\r\n
getPortalType\r\n
getSimulationState\r\n
getSimulationStateTitle\r\n
getValidationState\r\n
getValidationStateTitle\r\n
payment_state\r\n
event_state\r\n
getReference\r\n
getSourceReference\r\n
getDestinationReference\r\n
getStringIndex\r\n
getIntIndex\r\n
getFloatIndex\r\n
hasCellContent\r\n
getCreationDate\r\n
getModificationDate\r\n
......@@ -315,12 +261,18 @@ getStopDate</string> </value>
REPLACE INTO\n
catalog\n
(`uid`, `security_uid`, `path`, `owner`, `relative_url`, `parent_uid`, `id`, `description`, `title`,\n
`portal_type`, `validation_state`, `simulation_state`,\n
`reference`,\n
`source_reference`, `string_index`, `int_index`, `has_cell_content`, `creation_date`,\n
`modification_date`, `start_date`, `stop_date`, `indexation_date`)\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="security_uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="getPath[loop_item]" type="string">,\n
<dtml-sqlvar expr="getViewPermissionOwner[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getRelativeUrl[loop_item]" type="string">,\n
<dtml-sqlvar expr="getParentUid[loop_item]" type="int">,\n
<dtml-sqlvar expr="id[loop_item]" type="string" optional>,\n
......@@ -329,7 +281,6 @@ VALUES\n
<dtml-sqlvar expr="getPortalType[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getValidationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSimulationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSimulationStateTitle[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSourceReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getStringIndex[loop_item]" type="string" optional>,\n
......@@ -338,7 +289,8 @@ VALUES\n
<dtml-sqlvar expr="getCreationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getModificationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStartDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
null\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>
......@@ -383,12 +335,18 @@ VALUES\n
REPLACE INTO\n
catalog\n
(`uid`, `security_uid`, `path`, `owner`, `relative_url`, `parent_uid`, `id`, `description`, `title`,\n
`portal_type`, `validation_state`, `simulation_state`,\n
`reference`,\n
`source_reference`, `string_index`, `int_index`, `has_cell_content`, `creation_date`,\n
`modification_date`, `start_date`, `stop_date`, `indexation_date`)\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">, \n
<dtml-sqlvar expr="security_uid[loop_item]" type="int">,\n
<dtml-sqlvar expr="getPath[loop_item]" type="string">,\n
<dtml-sqlvar expr="getViewPermissionOwner[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getRelativeUrl[loop_item]" type="string">,\n
<dtml-sqlvar expr="getParentUid[loop_item]" type="int">,\n
<dtml-sqlvar expr="id[loop_item]" type="string" optional>,\n
......@@ -397,7 +355,6 @@ VALUES\n
<dtml-sqlvar expr="getPortalType[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getValidationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSimulationState[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSimulationStateTitle[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getSourceReference[loop_item]" type="string" optional>,\n
<dtml-sqlvar expr="getStringIndex[loop_item]" type="string" optional>,\n
......@@ -406,7 +363,8 @@ VALUES\n
<dtml-sqlvar expr="getCreationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getModificationDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStartDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
null\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>
......
......@@ -6,7 +6,7 @@
<value>1</value>
</item>
<item key="_filter_expression_archive" type="str">
<value>python: isMovement</value>
<value>python: isMovement and not isInventoryMovement</value>
</item>
<item key="_filter_type_archive" type="tuple">
</item>
......
......@@ -42,12 +42,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......@@ -102,6 +96,7 @@ CREATE TABLE `catalog` (\n
`uid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,\n
`security_uid` INT UNSIGNED,\n
`path` varchar(255) NOT NULL default \'\',\n
`owner` varchar(32) default \'\',\n
`relative_url` varchar(255) NOT NULL default \'\',\n
`parent_uid` BIGINT UNSIGNED default \'0\',\n
`id` varchar(255) default \'\',\n
......@@ -110,7 +105,6 @@ CREATE TABLE `catalog` (\n
`portal_type` varchar(255) default \'\',\n
`validation_state` varchar(255) default \'\',\n
`simulation_state` varchar(255) default \'\',\n
`simulation_state_title` varchar(255) default \'\',\n
`reference` varchar(255) default \'\',\n
`source_reference` varchar(255) default \'\',\n
`string_index` varchar(255),\n
......@@ -120,18 +114,20 @@ CREATE TABLE `catalog` (\n
`modification_date` datetime,\n
`start_date` datetime,\n
`stop_date` datetime,\n
`indexation_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n
PRIMARY KEY (`uid`),\n
KEY `security_uid` (`security_uid`),\n
KEY `Parent` (`parent_uid`, `portal_type`, `security_uid`),\n
KEY `Type1` (`portal_type`),\n
KEY `owner` (`owner`),\n
KEY `Parent` (`parent_uid`, `security_uid`),\n
KEY `parent_simulation_security` (`parent_uid`, `simulation_state`, `security_uid`),\n
KEY `validation_state` (`validation_state`, `portal_type`, `security_uid`),\n
KEY `simulation_state` (`simulation_state`, `portal_type`, `security_uid`),\n
KEY `simulation_state_title` (`simulation_state_title`, `portal_type`, `security_uid`),\n
KEY `source_reference` (`parent_uid`, `source_reference`),\n
KEY `type_source_reference` (`portal_type`, `source_reference`),\n
KEY `start_date` (`parent_uid`, `start_date`),\n
KEY `reference` (`portal_type`, `reference`),\n
KEY `Path` (`path`),\n
KEY `relative_url` (`relative_url`)\n
KEY `relative_url` (`relative_url`),\n
KEY `indexation_date` (`indexation_date`)\n
) TYPE=InnoDB;\n
</string> </value>
</item>
......@@ -177,6 +173,7 @@ CREATE TABLE `catalog` (\n
`uid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,\n
`security_uid` INT UNSIGNED,\n
`path` varchar(255) NOT NULL default \'\',\n
`owner` varchar(32) default \'\',\n
`relative_url` varchar(255) NOT NULL default \'\',\n
`parent_uid` BIGINT UNSIGNED default \'0\',\n
`id` varchar(255) default \'\',\n
......@@ -185,7 +182,6 @@ CREATE TABLE `catalog` (\n
`portal_type` varchar(255) default \'\',\n
`validation_state` varchar(255) default \'\',\n
`simulation_state` varchar(255) default \'\',\n
`simulation_state_title` varchar(255) default \'\',\n
`reference` varchar(255) default \'\',\n
`source_reference` varchar(255) default \'\',\n
`string_index` varchar(255),\n
......@@ -195,18 +191,20 @@ CREATE TABLE `catalog` (\n
`modification_date` datetime,\n
`start_date` datetime,\n
`stop_date` datetime,\n
`indexation_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,\n
PRIMARY KEY (`uid`),\n
KEY `security_uid` (`security_uid`),\n
KEY `Parent` (`parent_uid`, `portal_type`, `security_uid`),\n
KEY `Type1` (`portal_type`),\n
KEY `owner` (`owner`),\n
KEY `Parent` (`parent_uid`, `security_uid`),\n
KEY `parent_simulation_security` (`parent_uid`, `simulation_state`, `security_uid`),\n
KEY `validation_state` (`validation_state`, `portal_type`, `security_uid`),\n
KEY `simulation_state` (`simulation_state`, `portal_type`, `security_uid`),\n
KEY `simulation_state_title` (`simulation_state_title`, `portal_type`, `security_uid`),\n
KEY `source_reference` (`parent_uid`, `source_reference`),\n
KEY `type_source_reference` (`portal_type`, `source_reference`),\n
KEY `start_date` (`parent_uid`, `start_date`),\n
KEY `reference` (`portal_type`, `reference`),\n
KEY `Path` (`path`),\n
KEY `relative_url` (`relative_url`)\n
KEY `relative_url` (`relative_url`),\n
KEY `indexation_date` (`indexation_date`)\n
) TYPE=InnoDB;\n
</string> </value>
</item>
......
......@@ -48,12 +48,6 @@
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
......@@ -48,12 +48,6 @@
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
<catalog_method>
<item key="sql_clear_catalog" type="int">
<value>1</value>
</item>
</catalog_method>
\ No newline at end of file
......@@ -42,12 +42,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
......@@ -42,12 +42,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......@@ -103,8 +97,7 @@ CREATE TABLE `stock` (\n
`node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n
`function_uid` BIGINT UNSIGNED,\n
`project_uid` BIGINT UNSIGNED,\n
`explanation_uid` BIGINT UNSIGNED,\n
`mirror_section_uid` BIGINT UNSIGNED,\n
`mirror_node_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
......@@ -118,19 +111,17 @@ CREATE TABLE `stock` (\n
KEY `uid` (`uid`),\n
KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n
KEY `mirror_node_uid` (`mirror_node_uid`),\n
KEY `node_uid` (`node_uid`),\n
KEY `payment_uid` (`payment_uid`),\n
KEY `function_uid` (`function_uid`),\n
KEY `project_uid` (`project_uid`),\n
KEY `explanation_uid` (`explanation_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `simulation_state` (`simulation_state`),\n
KEY `resource_node_uid` (`resource_uid`, `node_uid`),\n
KEY `resource_section_node_uid` (`resource_uid`, `section_uid`, `node_uid`, `simulation_state`),\n
KEY `resource_section_node_uid_state` (`resource_uid`, `section_uid`, `node_uid`, `simulation_state`),\n
KEY `resource_payment_state` (`resource_uid`, `payment_uid`, `simulation_state`),\n
KEY `resource_payment` (`resource_uid`, `payment_uid`),\n
KEY `resource_payment_state_date` (`resource_uid`, `payment_uid`, `simulation_state`, `date`)\n
KEY `resource_payment_uid` (`resource_uid`, `payment_uid`),\n
KEY `resource_payment_state_date` (`resource_uid`, `payment_uid`, `simulation_state`, `date`),\n
KEY `node_resource_variation_state_date` (`node_uid`, `resource_uid`, `variation_text`, `simulation_state`, `date`)\n
) TYPE = InnoDB;\n
</string> </value>
</item>
......@@ -177,8 +168,7 @@ CREATE TABLE `stock` (\n
`node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n
`function_uid` BIGINT UNSIGNED,\n
`project_uid` BIGINT UNSIGNED,\n
`explanation_uid` BIGINT UNSIGNED,\n
`mirror_section_uid` BIGINT UNSIGNED,\n
`mirror_node_uid` BIGINT UNSIGNED,\n
`resource_uid` BIGINT UNSIGNED,\n
......@@ -192,19 +182,17 @@ CREATE TABLE `stock` (\n
KEY `uid` (`uid`),\n
KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n
KEY `mirror_node_uid` (`mirror_node_uid`),\n
KEY `node_uid` (`node_uid`),\n
KEY `payment_uid` (`payment_uid`),\n
KEY `function_uid` (`function_uid`),\n
KEY `project_uid` (`project_uid`),\n
KEY `explanation_uid` (`explanation_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `simulation_state` (`simulation_state`),\n
KEY `resource_node_uid` (`resource_uid`, `node_uid`),\n
KEY `resource_section_node_uid` (`resource_uid`, `section_uid`, `node_uid`, `simulation_state`),\n
KEY `resource_section_node_uid_state` (`resource_uid`, `section_uid`, `node_uid`, `simulation_state`),\n
KEY `resource_payment_state` (`resource_uid`, `payment_uid`, `simulation_state`),\n
KEY `resource_payment` (`resource_uid`, `payment_uid`),\n
KEY `resource_payment_state_date` (`resource_uid`, `payment_uid`, `simulation_state`, `date`)\n
KEY `resource_payment_uid` (`resource_uid`, `payment_uid`),\n
KEY `resource_payment_state_date` (`resource_uid`, `payment_uid`, `simulation_state`, `date`),\n
KEY `node_resource_variation_state_date` (`node_uid`, `resource_uid`, `variation_text`, `simulation_state`, `date`)\n
) TYPE = InnoDB;\n
</string> </value>
</item>
......
......@@ -51,12 +51,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
......
......@@ -208,6 +208,9 @@
<name>Add Formulator Forms</name>
<role>Manager</role>
</permission>
<permission type='list'>
<name>Add HBTreeFolder2s</name>
</permission>
<permission type='tuple'>
<name>Add LocalContents</name>
<role>Manager</role>
......@@ -312,6 +315,9 @@
<name>Add Zope Tutorials</name>
<role>Manager</role>
</permission>
<permission type='list'>
<name>Add old_CMFActivity Tools</name>
</permission>
<permission type='tuple'>
<name>Add portal content</name>
<role>Assignor</role>
......@@ -466,10 +472,6 @@
<name>Edit Factories</name>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Edit ParsedXML</name>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>Edit ReStructuredText</name>
<role>Manager</role>
......@@ -673,10 +675,6 @@
<role>Author</role>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View DOM hierarchy</name>
<role>Manager</role>
</permission>
<permission type='tuple'>
<name>View History</name>
<role>Assignee</role>
......
397
\ No newline at end of file
399
\ No newline at end of file
erp5_mysql_innodb/z_catalog_delivery_list
erp5_mysql_innodb/z_catalog_item_list
erp5_mysql_innodb/z_catalog_movement_list
erp5_mysql_innodb/z_catalog_object_list
erp5_mysql_innodb/z_catalog_stock_list
erp5_mysql_innodb/z_create_catalog
erp5_mysql_innodb/z_create_category
erp5_mysql_innodb/z_create_delivery
erp5_mysql_innodb/z_create_item
erp5_mysql_innodb/z_create_roles_and_users
erp5_mysql_innodb/z_create_stock
erp5_mysql_innodb/z_related_default_site
......
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