mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
issue 1980 Add use index to document select query
add low priority to document DML query git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10665 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3bbddf032e
commit
4d4b66d0d2
6 changed files with 10 additions and 9 deletions
|
|
@ -252,7 +252,7 @@
|
|||
$division = (int)Context::get('division');
|
||||
|
||||
// order by list_order and (module_srl===0 or module_srl many count), therefore case table full scan
|
||||
if($args->sort_index == 'list_order' && ((int)$args->exclude_module_srl === 0 || count($args->module_srl) > 10))
|
||||
if($args->sort_index == 'list_order' && ($args->exclude_module_srl === '0' || count(explode(',', $args->module_srl)) > 5))
|
||||
{
|
||||
$listSqlID = 'document.getDocumentListUseIndex';
|
||||
$divisionSqlID = 'document.getDocumentDivisionUseIndex';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<query id="deleteDocument" action="delete">
|
||||
<query id="deleteDocument" action="delete" priority="LOW">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<priority type="low" />
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
</conditions>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<index_hint name="idx_list_order" type="use" />
|
||||
<index_hint for="MYSQL">
|
||||
<index table="documents" name="idx_list_order" type="USE" />
|
||||
</index_hint>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@
|
|||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<index_hint name="idx_list_order" type="use" />
|
||||
<index_hint for="MYSQL">
|
||||
<index table="documents" name="idx_list_order" type="USE" />
|
||||
</index_hint>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="notin" column="module_srl" var="exclude_module_srl" filter="number" pipe="and" />
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<query id="insertDocument" action="insert">
|
||||
<query id="insertDocument" action="insert" priority="LOW">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<priority type="low" />
|
||||
<columns>
|
||||
<column name="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<query id="updateDocument" action="update">
|
||||
<query id="updateDocument" action="update" priority="LOW">
|
||||
<tables>
|
||||
<table name="documents" />
|
||||
</tables>
|
||||
<priority type="low" />
|
||||
<columns>
|
||||
<column name="module_srl" var="module_srl" filter="number" default="0" />
|
||||
<column name="category_srl" var="category_srl" filter="number" default="0" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue