mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
Added index hints for CUBRID and Mysql.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9472 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0b8949cfeb
commit
96b60466be
18 changed files with 350 additions and 4 deletions
39
test-phpUnit/db/xml_query/cubrid/CubridIndexHintTest.php
Normal file
39
test-phpUnit/db/xml_query/cubrid/CubridIndexHintTest.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
class CubridIndexHintTest extends CubridTest {
|
||||
var $xmlPath = 'data/';
|
||||
|
||||
function CubridIndexHintTest(){
|
||||
$this->xmlPath = str_replace('CubridIndexHintTest.php', '', str_replace('\\', '/', __FILE__)) . $this->xmlPath;
|
||||
}
|
||||
|
||||
function _test($xml_file, $argsString, $expected){
|
||||
var_dump($xml_file);
|
||||
$this->_testQuery($xml_file, $argsString, $expected, 'getSelectSql');
|
||||
}
|
||||
|
||||
function testOneUseIndexHintAndOneTable(){
|
||||
$xml_file = $this->xmlPath . "one_index_hint_one_table.xml";
|
||||
$argsString = '';
|
||||
$expected = 'select * from "xe_member" as "member" using index "member"."idx_member_list_order"';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
|
||||
function testTwoUseIndexHintsAndOneTable(){
|
||||
$xml_file = $this->xmlPath . "two_index_hints_one_table.xml";
|
||||
$argsString = '';
|
||||
$expected = 'select * from "xe_member" as "member" using index "member"."idx_member_list_order", "member"."idx_member_srl"';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function testThreeUseIndexHintsAndTwoTables(){
|
||||
$xml_file = $this->xmlPath . "three_index_hints_two_tables.xml";
|
||||
$argsString = '';
|
||||
$expected = 'select * from "xe_member" as "member", "xe_document" as "document"
|
||||
using index "member"."idx_member_list_order", "member"."idx_member_srl", "document"."idx_document_srl"';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<query id="index_hint" action="select">
|
||||
<tables>
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<index_hint for="CUBRID">
|
||||
<index table="member" name="idx_member_list_order" type="USE" />
|
||||
</index_hint>
|
||||
</query>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<query id="index_hint" action="select">
|
||||
<tables>
|
||||
<table name="member" alias="member" />
|
||||
<table name="document" alias="document" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<index_hint for="CUBRID">
|
||||
<index table="member" name="idx_member_list_order" type="USE" />
|
||||
<index table="member" name="idx_member_srl" type="USE" />
|
||||
<index table="document" name="idx_document_srl" type="USE" />
|
||||
</index_hint>
|
||||
</query>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<query id="index_hint" action="select">
|
||||
<tables>
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<index_hint for="CUBRID">
|
||||
<index table="member" name="idx_member_list_order" type="USE" />
|
||||
<index table="member" name="idx_member_srl" type="USE" />
|
||||
</index_hint>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue