forked from docs/doc-exports
reverting ddm umn to state before last commit in #613
This commit is contained in:
parent
fde3473737
commit
4d2a10f314
3065
docs/ddm/umn/ALL_META.TXT.json
Normal file
3065
docs/ddm/umn/ALL_META.TXT.json
Normal file
File diff suppressed because it is too large
Load Diff
1532
docs/ddm/umn/CLASS.TXT.json
Normal file
1532
docs/ddm/umn/CLASS.TXT.json
Normal file
File diff suppressed because it is too large
Load Diff
3
docs/ddm/umn/PARAMETERS.txt
Normal file
3
docs/ddm/umn/PARAMETERS.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version=""
|
||||||
|
language="en-us"
|
||||||
|
type=""
|
15
docs/ddm/umn/ddm-01-0002.html
Normal file
15
docs/ddm/umn/ddm-01-0002.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<a name="ddm-01-0002"></a><a name="ddm-01-0002"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Application Scenarios</h1>
|
||||||
|
<div id="body1553068858241"><p class="litext" id="ddm-01-0002__p30971651">It is especially suitable for applications requiring high-concurrency access to large volumes of data. Typical application scenarios are as follows:</p>
|
||||||
|
<ul id="ddm-01-0002__ul10309404"><li id="ddm-01-0002__li61374531"><strong id="ddm-01-0002__b094592313314">Internet</strong><p id="ddm-01-0002__p5281111">E-commerce, finance, O2O, retail, and social networking applications usually face challenges such as large user base, frequent marketing events, and slow response of core transactional systems. DDM can scale compute and storage resources to improve database processing of high-concurrency transactions and ensure fast access to data.</p>
|
||||||
|
</li><li id="ddm-01-0002__li47530006"><strong id="ddm-01-0002__b15802911172517">IoT</strong><p id="ddm-01-0002__p24725298">In industrial monitoring, remote control, smart city extension, smart home, and Internet of Vehicles (IoV) scenarios, a large number of sensors and monitoring devices frequently collect data and generate huge amounts of data, which may exceed the storage capability of single-node databases. DDM provides horizontal expansion to help you store massive data at low costs.</p>
|
||||||
|
</li><li id="ddm-01-0002__li20561848"><strong id="ddm-01-0002__b1096815718335">Traditional sectors</strong><p id="ddm-01-0002__p54897010">Government agencies, large-sized enterprises, banks, and the like usually use commercial solutions to support high-concurrency access to large volumes of data. These solutions are expensive because they need to rely on mid-range computers and high-end storage devices. DDM, deployed in clusters with common ECSs, provides cost-efficient database solutions with the same or even higher performance than traditional commercial database solutions.</p>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
21
docs/ddm/umn/ddm-01-0003.html
Normal file
21
docs/ddm/umn/ddm-01-0003.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<a name="ddm-01-0003"></a><a name="ddm-01-0003"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Usage Constraints</h1>
|
||||||
|
<div id="body1553068858245"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-01-0004.html">Network Access</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0005.html">Data Nodes</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0174.html">Unsupported Features and Limitations</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0175.html">High-risk Operations</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
12
docs/ddm/umn/ddm-01-0004.html
Normal file
12
docs/ddm/umn/ddm-01-0004.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<a name="ddm-01-0004"></a><a name="ddm-01-0004"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Network Access</h1>
|
||||||
|
<div id="body1557802079200"><p id="ddm-01-0004__p6179243184919">Restrictions on network access are as follows:</p>
|
||||||
|
<ul id="ddm-01-0004__ul1240194704010"><li id="ddm-01-0004__li14516223117">The data nodes and ECSs running your applications must be in the same VPC as your DDM instance.</li><li id="ddm-01-0004__li1119413183215">To access DDM from your computer, you need to bind an EIP to your DDM instance and then use the EIP to access the DDM instance.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-01-0003.html">Usage Constraints</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
27
docs/ddm/umn/ddm-08-0001.html
Normal file
27
docs/ddm/umn/ddm-08-0001.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<a name="ddm-08-0001"></a><a name="ddm-08-0001"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SQL Syntax</h1>
|
||||||
|
<div id="body1597045078510"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0062.html">Introduction</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0003.html">DDL</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0004.html">DML</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0063.html">Functions</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0013.html">Use Constraints</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0002.html">Supported SQL Statements</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0030.html">Global Sequence</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0032.html">Database Management Syntax</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0035.html">Advanced SQL Functions</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
35
docs/ddm/umn/ddm-08-0002.html
Normal file
35
docs/ddm/umn/ddm-08-0002.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<a name="ddm-08-0002"></a><a name="ddm-08-0002"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Supported SQL Statements</h1>
|
||||||
|
<div id="body1599640064066"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0014.html">CHECK TABLE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0015.html">SHOW RULE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0017.html">SHOW TOPOLOGY</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0029.html">SHOW DATA NODE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0023.html">TRUNCATE TABLE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0027.html">HINT- ALLOW_ALTER_RERUN</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0031.html">LOAD DATA</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_08_0032.html">SHOW PHYSICAL PROCESSLIST</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0034.html">Customized Hints for Read/Write Splitting</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0039.html">Setting a Hint to Skip the Cached Execution Plan</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0040.html">Specifying a Shard Using a Hint When Executing a SQL Statement</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
21
docs/ddm/umn/ddm-08-0003.html
Normal file
21
docs/ddm/umn/ddm-08-0003.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<a name="ddm-08-0003"></a><a name="ddm-08-0003"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">DDL</h1>
|
||||||
|
<div id="body1597045078514"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_12_0006.html">Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_08_0029.html">Creating a Table</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0038.html">Sharding Algorithm Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_10_0018.html">Sharding Algorithms</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
31
docs/ddm/umn/ddm-08-0004.html
Normal file
31
docs/ddm/umn/ddm-08-0004.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<a name="ddm-08-0004"></a><a name="ddm-08-0004"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">DML</h1>
|
||||||
|
<div id="body1597045079929"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0005.html">INSERT</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0007.html">REPLACE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0008.html">DELETE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0009.html">UPDATE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0006.html">SELECT</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0010.html">SELECT JOIN Syntax</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0011.html">SELECT UNION Syntax</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0012.html">SELECT Subquery Syntax</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_12_0100.html">Supported System Schema Queries</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
27
docs/ddm/umn/ddm-08-0005.html
Normal file
27
docs/ddm/umn/ddm-08-0005.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<a name="ddm-08-0005"></a><a name="ddm-08-0005"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">INSERT</h1>
|
||||||
|
<div id="body1597045079930"><p id="ddm-08-0005__p8060118">INSERT is used to insert data into database objects.</p>
|
||||||
|
<div class="section" id="ddm-08-0005__section36113533417"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0005__screen205301452162214">INSERT [INTO] tbl_name
|
||||||
|
[(col_name,...)]
|
||||||
|
{VALUES | VALUE} ({expr },...),(...),...
|
||||||
|
[ ON DUPLICATE KEY UPDATE
|
||||||
|
col_name=expr
|
||||||
|
[, col_name=expr] ... ]
|
||||||
|
OR
|
||||||
|
INSERT [INTO] tbl_name
|
||||||
|
SET col_name={expr | DEFAULT}, ...
|
||||||
|
[ ON DUPLICATE KEY UPDATE
|
||||||
|
col_name=expr [, col_name=expr] ... ]</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0005__section1280014191938"><h4 class="sectiontitle">Syntax Restrictions</h4><ul id="ddm-08-0005__en-us_topic_0169506650_ul7325172223219"><li id="ddm-08-0005__li1349813438517">INSERT DELAYED is not supported.</li><li id="ddm-08-0005__li421716473512">Only INSERT statements that contain sharding fields are supported.</li><li id="ddm-08-0005__li141896616418">PARTITION syntax is not supported. Partitioned tables are not recommended.</li><li id="ddm-08-0005__li2243101572415">Setting <strong id="ddm-08-0005__b5260624194618">datetime</strong> to <strong id="ddm-08-0005__b143602384715">1582</strong> or any value smaller in INSERT statements is not supported.</li><li id="ddm-08-0005__li353015422376">INSERT cannot be used to insert sharding key value <strong id="ddm-08-0005__b14825205498">DEFAULT</strong>.</li><li id="ddm-08-0005__li61835420562">If you specify an auto-increment key value in an INSERT statement and execute it on a sharded table, the auto-increment key value of the inserted data entry changes. Auto-increment key values of data entries inserted subsequently will increase based on the first inserted data entry unless you specify a new auto-increment key value.</li><li id="ddm-08-0005__li1329212114352">Referencing a table column in function REPEAT of the VALUES statement is not supported, for example, INSERT INTO T(NAME) VALUES(REPEAT(ID,3)).</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0005__section1884017577597"><h4 class="sectiontitle">Use Constraints</h4><ul id="ddm-08-0005__ul328719541792"><li id="ddm-08-0005__li162871541194">If the sharding key value in the INSERT statement is invalid, data is routed to database shard 0 or table shard 0 by default.</li><li id="ddm-08-0005__li92871054699">Do not use functions VERSION, DATABASE, or USER in the INSERT statement. When you execute such as functions, you may not obtain the expected results because its results depend on whether it pushed to data nodes for execution.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
64
docs/ddm/umn/ddm-08-0006.html
Normal file
64
docs/ddm/umn/ddm-08-0006.html
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<a name="ddm-08-0006"></a><a name="ddm-08-0006"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SELECT</h1>
|
||||||
|
<div id="body1597045079935"><p id="ddm-08-0006__p1620919463820">SELECT is generally used to query data in one or more tables.</p>
|
||||||
|
<div class="section" id="ddm-08-0006__section8559171941216"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0006__screen10565234132012">SELECT
|
||||||
|
[ALL | DISTINCT | DISTINCTROW ]
|
||||||
|
select_expr
|
||||||
|
[, select_expr ...]
|
||||||
|
[FROM table_references [WHERE where_condition]
|
||||||
|
[GROUP BY {col_name | expr | position} [ASC | DESC], ...]
|
||||||
|
[HAVING where_condition] [ORDER BY {col_name | expr | position} [ASC | DESC], ...]
|
||||||
|
[LIMIT {[offset,] row_count | row_count OFFSET offset}]</pre>
|
||||||
|
</div>
|
||||||
|
<div class="p" id="ddm-08-0006__p18541338174313">
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm-08-0006__table123165064115" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Supported syntax</caption><thead align="left"><tr id="ddm-08-0006__row13232195034115"><th align="left" class="cellrowborder" valign="top" width="33.87%" id="mcps1.3.3.1.2.3.1.1"><p id="ddm-08-0006__p12232205017410"><strong id="ddm-08-0006__b61216369204">Syntax</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="66.13%" id="mcps1.3.3.1.2.3.1.2"><p id="ddm-08-0006__p10232950184114"><strong id="ddm-08-0006__b919953813201">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm-08-0006__row32321650114111"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p123210502410">select_expr</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p162322500417">Indicates a column that you want to query.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm-08-0006__row10232350164113"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p92321850174115">FROM table_references</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p19232125016412">Indicates the tables that you want to query.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm-08-0006__row42321650204114"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p8232135034115">WHERE</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p1232105015411">Followed by an expression to filter for rows that meet certain criteria.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm-08-0006__row523285019412"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p202321350174119">GROUP BY</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p7232125024116">Groups the clauses used in SQL in sequence. GROUP BY indicates relationships between statements and supports column names. For example, the HAVING clause must be after the GROUP BY clause and before the ORDER BY clause.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm-08-0006__row20232750184118"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p15232115016414">ORDER BY</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p023225074110">Indicates relationships between statements. Sorting by column name or by a specified order such as ASC and DESC is supported.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm-08-0006__row4232175014110"><td class="cellrowborder" valign="top" width="33.87%" headers="mcps1.3.3.1.2.3.1.1 "><p id="ddm-08-0006__p20232155094118">LIMIT/OFFSET</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="66.13%" headers="mcps1.3.3.1.2.3.1.2 "><p id="ddm-08-0006__p114501511204313">Restrains the offset and size of output result sets, for example, one or two values can be input after LIMIT.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0006__section1019017511569"><h4 class="sectiontitle">Syntax Description</h4><ul id="ddm-08-0006__ul196911227588"><li id="ddm-08-0006__li410762215381">An empty string cannot be used as an alias.</li><li id="ddm-08-0006__li136814241582">SELECT ... GROUP BY ... WITH ROLLUP is not supported.</li><li id="ddm-08-0006__li20108022143817">Neither STRAIGHT_JOIN nor NATURAL JOIN is supported.</li><li id="ddm-08-0006__li5838144812385">The SELECT FOR UPDATE statement supports only simple queries and does not support JOIN, GROUP BY, ORDER BY, or LIMIT.</li><li id="ddm-08-0006__li141099222388">Each SELECT statement in UNION does not support multiple columns with the same name, for example,<p id="ddm-08-0006__p1161535214386"><a name="ddm-08-0006__li141099222388"></a><a name="li141099222388"></a>SELECT id, id, name FROM t1 UNION SELECT pk, pk, name FROM t2 is not supported because this statement has duplicate column names.</p>
|
||||||
|
</li><li id="ddm-08-0006__li654214302312">User-defined sequencing similar to <strong id="ddm-08-0006__b885789193917">ORDER BY FIELD(id,1,2,3)</strong> is not supported.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
18
docs/ddm/umn/ddm-08-0007.html
Normal file
18
docs/ddm/umn/ddm-08-0007.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<a name="ddm-08-0007"></a><a name="ddm-08-0007"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">REPLACE</h1>
|
||||||
|
<div id="body1597045079931"><p id="ddm-08-0007__p8060118">REPLACE is used to insert rows into or replace rows in a table.</p>
|
||||||
|
<div class="section" id="ddm-08-0007__section1995564111172"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0007__screen1077803514227">replace into table(col1,col2,col3)
|
||||||
|
values(value1,value2,value3)</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0007__section250413125338"><h4 class="sectiontitle">Syntax Constraints</h4><ul id="ddm-08-0007__ul274619166482"><li id="ddm-08-0007__li9746316174820">PARTITION syntax is not supported.</li><li id="ddm-08-0007__li6746131674815">If an auto-increment table has no ID, you can insert a data record with a specified ID using REPLACE, but no ID is generated.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0007__section1884017577597"><h4 class="sectiontitle">Use Constraints</h4><ul id="ddm-08-0007__ul16857164853317"><li id="ddm-08-0007__li7858148173316">If the sharding key value in the REPLACE statement is invalid, data is routed to database shard 0 or table shard 0 by default.</li><li id="ddm-08-0007__li28584486335">Do not use functions VERSION, DATABASE, or USER in the REPLACE statement. When you execute such as functions, you may not obtain the expected results because its results depend on whether it pushed to data nodes for execution.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
16
docs/ddm/umn/ddm-08-0008.html
Normal file
16
docs/ddm/umn/ddm-08-0008.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<a name="ddm-08-0008"></a><a name="ddm-08-0008"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">DELETE</h1>
|
||||||
|
<div id="body1597045079932"><p id="ddm-08-0008__p1225913363529">DELETE is used to delete rows that meet conditions from a table.</p>
|
||||||
|
<div class="section" id="ddm-08-0008__section16157550115213"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0008__screen178161921142219">DELETE [IGNORE]
|
||||||
|
FROM tbl_name [WHERE where_condition]</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0008__section11542530185813"><h4 class="sectiontitle">Syntax Restrictions</h4><ul id="ddm-08-0008__ul97198382583"><li id="ddm-08-0008__li8537185884617">The WHERE clause does not support subqueries, including correlated and non-correlated subqueries.</li><li id="ddm-08-0008__li95371587463">Data in reference tables cannot be deleted when multiple tables are deleted at a time.</li><li id="ddm-08-0008__li1855703817222">PARTITION clauses are not supported.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
17
docs/ddm/umn/ddm-08-0009.html
Normal file
17
docs/ddm/umn/ddm-08-0009.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<a name="ddm-08-0009"></a><a name="ddm-08-0009"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">UPDATE</h1>
|
||||||
|
<div id="body1597045079933"><div class="section" id="ddm-08-0009__section0886140223"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0009__screen2034416355214">UPDATE table_reference
|
||||||
|
SET col_name1={expr1} [, col_name2={expr2}] ...
|
||||||
|
[WHERE where_condition]</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0009__section13101911638"><h4 class="sectiontitle">Syntax Restrictions</h4><ul id="ddm-08-0009__ul19343647289"><li id="ddm-08-0009__li595783310450">Subqueries are not supported, including correlated and non-correlated subqueries.</li><li id="ddm-08-0009__li1595451902312">Cross-shard subquery is not supported.</li><li id="ddm-08-0009__li1655810534458">The WHERE condition in the UPDATE statement does not support arithmetic expressions and their subqueries.</li><li id="ddm-08-0009__li34801448174515">Modifying broadcast tables is not supported during an update of multiple tables. (Data in columns of a broadcast table cannot be on the left of SET assignment statements).</li><li id="ddm-08-0009__li395763394519">Updating the sharding key field of a logical table is not supported because this operation may cause data redistribution.</li><li id="ddm-08-0009__li2243101572415">Setting <strong id="ddm-08-0009__b1382162013496">datetime</strong> to <strong id="ddm-08-0009__b43841320194920">1582</strong> or any value smaller in UPDATE statements is not supported.</li><li id="ddm-08-0009__li397144103312">UPDATE cannot be used to update sharding key value <strong id="ddm-08-0009__b144531158194914">DEFAULT</strong>.</li><li id="ddm-08-0009__li151721114114716">Repeatedly updating the same field in an UPDATE statement is not supported.</li><li id="ddm-08-0009__li15439163024720">Updating a sharding key using UPDATE JOIN syntax is not supported.</li><li id="ddm-08-0009__li64396431858">UPDATE cannot be used to update self-joins.</li><li id="ddm-08-0009__li19551013286">Referencing other object columns in assignment statements or expressions may cause unexpected update results. Example:<p id="ddm-08-0009__p18887153252820"><a name="ddm-08-0009__li19551013286"></a><a name="li19551013286"></a>update tbl_1 a,tbl_2 b set a.name=concat(b.name,'aaaa'),b.name=concat(a.name,'bbbb') on a.id=b.id</p>
|
||||||
|
</li><li id="ddm-08-0009__li1691531614442">UPDATE JOIN supports only joins with WHERE conditions.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
36
docs/ddm/umn/ddm-08-0010.html
Normal file
36
docs/ddm/umn/ddm-08-0010.html
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<a name="ddm-08-0010"></a><a name="ddm-08-0010"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SELECT JOIN Syntax</h1>
|
||||||
|
<div id="body1597045079936"><div class="section" id="ddm-08-0010__section1470113220458"><h4 class="sectiontitle">Common Syntax</h4><p id="ddm-08-0010__p116711138181216">table_references:</p>
|
||||||
|
<pre class="screen" id="ddm-08-0010__screen5924175061215">table_reference [, table_reference] ...</pre>
|
||||||
|
<p id="ddm-08-0010__p467114387121">table_reference:</p>
|
||||||
|
<pre class="screen" id="ddm-08-0010__screen19757155710122">table_factor | join_table</pre>
|
||||||
|
<p id="ddm-08-0010__p16671153891215">table_factor:</p>
|
||||||
|
<pre class="screen" id="ddm-08-0010__screen23271146136">tbl_name [[AS] alias]
|
||||||
|
| table_subquery [AS] alias
|
||||||
|
| ( table_references )</pre>
|
||||||
|
<p id="ddm-08-0010__p1367210383123">join_table:</p>
|
||||||
|
<pre class="screen" id="ddm-08-0010__screen14781142110130">table_reference [INNER | CROSS] JOIN table_factor [join_condition]
|
||||||
|
| table_reference {LEFT|RIGHT} [OUTER] JOIN table_reference join_condition
|
||||||
|
| table_reference [{LEFT|RIGHT} [OUTER]] JOIN table_factor</pre>
|
||||||
|
<p id="ddm-08-0010__p66721538101211">join_condition:</p>
|
||||||
|
<pre class="screen" id="ddm-08-0010__screen155441027111314">ON conditional_expr
|
||||||
|
| USING (column_list)</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0010__section18123141258"><h4 class="sectiontitle">Syntax Restrictions</h4><p id="ddm-08-0010__p14579131622515">SELECT STRAIGHT_JOIN and NATURAL JOIN are not supported.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0010__section1236614481944"><h4 class="sectiontitle">Example</h4><pre class="screen" id="ddm-08-0010__screen56891436462">select id,name from test1 where id=1;
|
||||||
|
select distinct id,name from test1 where id>=1;
|
||||||
|
select id,name from test1 order by id limit 2 offset 2;
|
||||||
|
select id,name from test1 order by id limit 2,2;
|
||||||
|
select 1+1,'test',id,id*1.1,now() from test1 limit 3;
|
||||||
|
select current_date,current_timestamp;
|
||||||
|
select abs(sum(id)) from test1;</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
18
docs/ddm/umn/ddm-08-0011.html
Normal file
18
docs/ddm/umn/ddm-08-0011.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<a name="ddm-08-0011"></a><a name="ddm-08-0011"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SELECT UNION Syntax</h1>
|
||||||
|
<div id="body1597045079937"><div class="section" id="ddm-08-0011__section0452113243813"><h4 class="sectiontitle">Common Syntax</h4><pre class="screen" id="ddm-08-0011__screen1893383922719">SELECT ...UNION [ALL | DISTINCT]
|
||||||
|
SELECT ...[UNION [ALL | DISTINCT] SELECT ...]</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0011__section9756736185817"><h4 class="sectiontitle">Example</h4><pre class="screen" id="ddm-08-0011__screen1123984413581">select userid from user union select orderid from ordertbl order by userid;
|
||||||
|
select userid from user union (select orderid from ordertbl group by orderid) order by userid;</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0011__section1277220401952"><h4 class="sectiontitle">Syntax Restrictions</h4><p id="ddm-08-0011__p11235831125815">SELECT statements in UNION do not support duplicate column names.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
48
docs/ddm/umn/ddm-08-0012.html
Normal file
48
docs/ddm/umn/ddm-08-0012.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<a name="ddm-08-0012"></a><a name="ddm-08-0012"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SELECT Subquery Syntax</h1>
|
||||||
|
<div id="body1597045079944"><div class="section" id="ddm-08-0012__section15771114685915"><h4 class="sectiontitle">Subquery as Scalar Operand</h4><p id="ddm-08-0012__p1039662451412">Example</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen1262053510144">SELECT (SELECT id FROM test1 where id=1);
|
||||||
|
SELECT (SELECT id FROM test2 where id=1)FROM test1;
|
||||||
|
SELECT UPPER((SELECT name FROM test1 limit 1)) FROM test2;</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0012__section14287162151520"><h4 class="sectiontitle">Comparisons Using Subqueries</h4><p id="ddm-08-0012__p11282043517">Syntax</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen1890319172572">non_subquery_operand comparison_operator (subquery)
|
||||||
|
comparison_operator: = > < >= <= <> != <=> like</pre>
|
||||||
|
</div>
|
||||||
|
<p id="ddm-08-0012__p382568105419">Example</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen1815165619545">select name from test1 where id > (select id from test2 where id=1);
|
||||||
|
select name from test1 where id = (select id from test2 where id=1);
|
||||||
|
select id from test1 where name like (select name from test2 where id=1);</pre>
|
||||||
|
<div class="section" id="ddm-08-0012__section14597152195810"><h4 class="sectiontitle">Subqueries with ANY, IN, NOT IN, SOME,ALL,Exists,NOT Exists</h4><p id="ddm-08-0012__p8367105435810">Syntax</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen1271201815595">operand comparison_operator SOME (subquery)
|
||||||
|
operand comparison_operator ALL (subquery)
|
||||||
|
operand comparison_operator ANY (subquery)
|
||||||
|
operand IN (subquery)
|
||||||
|
operand not IN (subquery)
|
||||||
|
operand exists (subquery)
|
||||||
|
operand not exists (subquery)</pre>
|
||||||
|
</div>
|
||||||
|
<p id="ddm-08-0012__p1776154113594">Example</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen1956056704">select id from test1 where id > any (select id from test2);
|
||||||
|
select id from test1 where id > some (select id from test2);
|
||||||
|
select id from test1 where id > all (select id from test2);
|
||||||
|
select id from test1 where id in (select id from test2);
|
||||||
|
select id from test1 where id not in (select id from test2);
|
||||||
|
select id from test1 where exists (select id from test2 where id=1);
|
||||||
|
select id from test1 where not exists (select id from test2 where id=1);</pre>
|
||||||
|
<div class="section" id="ddm-08-0012__section892675411611"><h4 class="sectiontitle">Derived Tables (Subqueries in the FROM Clause)</h4><p id="ddm-08-0012__p429917571068">Syntax</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen265714182071">SELECT ... FROM (subquery) [AS] tbl_name ...</pre>
|
||||||
|
<p id="ddm-08-0012__p115911111713">Example</p>
|
||||||
|
<pre class="screen" id="ddm-08-0012__screen10792173519719">select id from (select id,name from test2 where id>1) a order by a.id;</pre>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0012__section104153553013"><h4 class="sectiontitle">Syntax Restrictions</h4><ul id="ddm-08-0012__ul12718734141018"><li id="ddm-08-0012__li1871863410107">Each derived table must have an alias.</li><li id="ddm-08-0012__li12191738161012">A derived table cannot be a correlated subquery.</li><li id="ddm-08-0012__li38921059181017">In some cases, correct results cannot be obtained using a scalar subquery. Using JOIN instead is recommended to improve query performance.</li><li id="ddm-08-0012__li1617524191119">Using subqueries in the HAVING clause and the JOIN ON condition is not supported.</li></ul>
|
||||||
|
<ul id="ddm-08-0012__ul13328552193020"><li id="ddm-08-0012__li194921336107">Row subqueries are not supported.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0004.html">DML</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
16
docs/ddm/umn/ddm-08-0013.html
Normal file
16
docs/ddm/umn/ddm-08-0013.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<a name="ddm-08-0013"></a><a name="ddm-08-0013"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Use Constraints</h1>
|
||||||
|
<div id="body1597045079948"><p id="ddm-08-0013__p466232353417">DDM is compatible with the MySQL license and syntax, but the use of SQL statements is limited due to differences between distributed databases and single-node databases.</p>
|
||||||
|
<div class="section" id="ddm-08-0013__section3131558184018"><h4 class="sectiontitle">Unsupported SQL Statements</h4><ul id="ddm-08-0013__ul71302554104"><li id="ddm-08-0013__li580003915295">Triggers</li><li id="ddm-08-0013__li5290184312411">Temporary tables</li><li id="ddm-08-0013__li1413194211305">DO statement</li><li id="ddm-08-0013__li1627111476295">Association with foreign keys</li><li id="ddm-08-0013__li515914301114">RESET statement</li><li id="ddm-08-0013__li115312913124">FLUSH statement</li><li id="ddm-08-0013__li1346194081816">BINLOG statement</li><li id="ddm-08-0013__li11979203815161">HANDLER statement</li><li id="ddm-08-0013__li54647442619">SHOW WARNINGS statement</li><li id="ddm-08-0013__li0459622202811">Assignment operator :=</li><li id="ddm-08-0013__li1736135114358">Operators less than (<), assignment (=), and more than (>)</li><li id="ddm-08-0013__li5971853365">Expression IS UNKNOWN</li><li id="ddm-08-0013__li4135132014123">INSTALL and UNINSTALL PLUGIN statements</li><li id="ddm-08-0013__li171137023014">Cross-shard stored procedures and custom functions</li><li id="ddm-08-0013__li1527811613301">Statements for modifying database names, table names, and sharding field names and types</li><li id="ddm-08-0013__li585183291110">Most of SHOW statements such as SHOW PROFILES and SHOW ERRORS</li><li id="ddm-08-0013__li209371125413">Table maintenance statements, including ANALYZE, CHECK, CHECKSUM, OPTIMIZE, and REPAIR TABLE</li><li id="ddm-08-0013__li929665115111">Statements for assigning a value to or querying variable <strong id="ddm-08-0013__b918724332216">session</strong>, for example, set @rowid=0;select @rowid:=@rowid+1,id from user</li><li id="ddm-08-0013__li8771013185216">SQL statements that use -- or /*...*/ to comment out a single line or multiple lines of code</li><li id="ddm-08-0013__li16348133183816">The result of the REPEAT function contains a maximum of 1,000,000 characters (in version 3.0.9 or later).</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm-08-0013__section6930101771618"><h4 class="sectiontitle">Permission Levels</h4><p id="ddm-08-0013__p1916616713487">Permission levels supported by DDM are as follows:</p>
|
||||||
|
<ul id="ddm-08-0013__ul1923091081615"><li id="ddm-08-0013__li122301810131610">Global level (not supported)</li><li id="ddm-08-0013__li152306109169">Database level (supported)</li><li id="ddm-08-0013__li192301510171615">Table level (supported)</li><li id="ddm-08-0013__li1523051051618">Column level (not supported)</li><li id="ddm-08-0013__li52301510111620">Subprogram level (not supported)</li><li id="ddm-08-0013__li42197472214">User level (supported)</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
17
docs/ddm/umn/ddm-08-0014.html
Normal file
17
docs/ddm/umn/ddm-08-0014.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<a name="ddm-08-0014"></a><a name="ddm-08-0014"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">CHECK TABLE</h1>
|
||||||
|
<div id="body1599640064068"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0021.html">Checking DDL Consistency of Physical Tables in All Logical Tables</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0022.html">Checking DDL Consistency of Physical Tables in One Logical Table</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
32
docs/ddm/umn/ddm-08-0015.html
Normal file
32
docs/ddm/umn/ddm-08-0015.html
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<a name="ddm-08-0015"></a><a name="ddm-08-0015"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SHOW RULE</h1>
|
||||||
|
<div id="body1599640064069"><p id="ddm-08-0015__p17329111808"><strong id="ddm-08-0015__b174541916461">Command Format 1:</strong></p>
|
||||||
|
<p id="ddm-08-0015__p4717115171317"><strong id="ddm-08-0015__b122140235135">show rule</strong>;</p>
|
||||||
|
<p id="ddm-08-0015__p1914614161357">It is used to view the sharding rule of each logical table in a certain schema.</p>
|
||||||
|
<p id="ddm-08-0015__p33291011607">Command output:</p>
|
||||||
|
<p id="ddm-08-0015__p1296332641613"><span><img id="ddm-08-0015__image86454510116" src="en-us_image_0000001733146413.png"></span></p>
|
||||||
|
<p id="ddm-08-0015__p457218521611"><strong id="ddm-08-0015__b14701443862">Command Format 2:</strong></p>
|
||||||
|
<p id="ddm-08-0015__p111111916137"><strong id="ddm-08-0015__b14610326137">show rule from </strong><em id="ddm-08-0015__i17843251312"><table_name></em>;</p>
|
||||||
|
<p id="ddm-08-0015__p6146171610511">It is used to view the sharding rule of a specific logical table in a certain schema.</p>
|
||||||
|
<p id="ddm-08-0015__p161401112419">Command output:</p>
|
||||||
|
<p id="ddm-08-0015__p815911513412"><span><img id="ddm-08-0015__image111598519414" src="en-us_image_0000001733266529.png"></span></p>
|
||||||
|
<p id="ddm-08-0015__p11143132210419"><strong id="ddm-08-0015__b15476133325519">Output Details:</strong></p>
|
||||||
|
<p id="ddm-08-0015__p1414332212420"><strong id="ddm-08-0015__b9425205613">TABLE_NAME</strong>: indicates the name of the logical table.</p>
|
||||||
|
<p id="ddm-08-0015__p142881856440"><strong id="ddm-08-0015__b12430457203516">BROADCAST</strong>: specifies whether the table is a broadcast table. <strong id="ddm-08-0015__b243165710358">0</strong> indicates that the table is not a broadcast table. <strong id="ddm-08-0015__b44322576359">1</strong> indicates the table is a broadcast table.</p>
|
||||||
|
<p id="ddm-08-0015__p192881256446"><strong id="ddm-08-0015__b39883487314">DB_PARTITION_KEY</strong>: indicates the database sharding key. Leave this field blank if database sharding is not required.</p>
|
||||||
|
<p id="ddm-08-0015__p8288175611414"><strong id="ddm-08-0015__b128071322257">DB_PARTITION_POLICY</strong>: indicates the database sharding algorithm. The value can be <strong id="ddm-08-0015__b1314422518450">HASH</strong>, <strong id="ddm-08-0015__b1699116414403">YYYYMM</strong>, <strong id="ddm-08-0015__b14508184444013">YYYYDD</strong>, and <strong id="ddm-08-0015__b162001646134013">YYYYWEEK</strong>.</p>
|
||||||
|
<p id="ddm-08-0015__p628817561242"><strong id="ddm-08-0015__b6492257154015">DB_PARTITION_COUNT</strong>: indicates the number of database shards.</p>
|
||||||
|
<p id="ddm-08-0015__p42880561443"><strong id="ddm-08-0015__b168871140370">DB_PARTITION_OFFSET</strong>: indicates where a new database shard starts from.</p>
|
||||||
|
<p id="ddm-08-0015__p14177305304"><strong id="ddm-08-0015__b954013450424">PARTITION_RANGE</strong>: indicates the sharding range when the database sharding algorithm is range.</p>
|
||||||
|
<p id="ddm-08-0015__p112871556346"><strong id="ddm-08-0015__b1536611135431">TB_PARTITION_KEY</strong>: indicates the table sharding key. Leave this field blank if table sharding is not required.</p>
|
||||||
|
<p id="ddm-08-0015__p5287155612414"><strong id="ddm-08-0015__b15041145445">TB_PARTITION_POLICY</strong>: indicates the table sharding algorithm. The value can be <strong id="ddm-08-0015__b1294954154515">HASH</strong>, <strong id="ddm-08-0015__b17410056184515">MM</strong>, <strong id="ddm-08-0015__b18989518463">DD</strong>, <strong id="ddm-08-0015__b19429664616">MMDD</strong>, or <strong id="ddm-08-0015__b2558414154616">WEEK</strong>.</p>
|
||||||
|
<p id="ddm-08-0015__p61449221743"><strong id="ddm-08-0015__b17202944617">TB_PARTITION_COUNT</strong>: indicates the number of physical tables in each database shard.</p>
|
||||||
|
<p id="ddm-08-0015__p614418227417"><strong id="ddm-08-0015__b133341913153817">TB_PARTITION_OFFSET</strong>: indicates where a new physical table starts from.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
20
docs/ddm/umn/ddm-08-0017.html
Normal file
20
docs/ddm/umn/ddm-08-0017.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<a name="ddm-08-0017"></a><a name="ddm-08-0017"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SHOW TOPOLOGY</h1>
|
||||||
|
<div id="body1599640064071"><p id="ddm-08-0017__p1757111616590"><strong id="ddm-08-0017__b193203366262">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0017__p1477441910141"><strong id="ddm-08-0017__b2096392771413">show topology from </strong><em id="ddm-08-0017__i96077289147"><table_name></em>;</p>
|
||||||
|
<p id="ddm-08-0017__p1892154917406">It is used to view physical tables corresponding to a specified logical table.</p>
|
||||||
|
<p id="ddm-08-0017__p14193513164311"><strong id="ddm-08-0017__b7157144510264">Output Details:</strong></p>
|
||||||
|
<p id="ddm-08-0017__p787181316454"><strong id="ddm-08-0017__b1893725775010">RDS_instance_id</strong>: indicates the ID of the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0017__p187451427184519"><strong id="ddm-08-0017__b117160573493">HOST</strong>: indicates the IP address of the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0017__p13877132454"><strong id="ddm-08-0017__b14347650192615">PORT</strong>: indicates the port number of the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0017__p98710132455"><strong id="ddm-08-0017__b4178155142617">DATABASE</strong>: indicates the physical database in the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0017__p387111354517"><strong id="ddm-08-0017__b1555955215263">TABLE</strong>: indicates the physical table.</p>
|
||||||
|
<p id="ddm-08-0017__p48751315455"><strong id="ddm-08-0017__b149801855172317">ROW_COUNT</strong>: indicates the estimated number of data entries in each physical table. The value is obtained from information_schema.TABLES.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
22
docs/ddm/umn/ddm-08-0021.html
Normal file
22
docs/ddm/umn/ddm-08-0021.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<a name="ddm-08-0021"></a><a name="ddm-08-0021"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Checking DDL Consistency of Physical Tables in All Logical Tables</h1>
|
||||||
|
<div id="body1599642876907"><p id="ddm-08-0021__p8282141889"><strong id="ddm-08-0021__b2519615111917">Purpose:</strong> To check DDL consistency of all logical tables in one schema</p>
|
||||||
|
<p id="ddm-08-0021__p1328481393019"><strong id="ddm-08-0021__b1343215571332">Command Format:</strong></p>
|
||||||
|
<pre class="codeblock" id="ddm-08-0021__codeblock189571212305"> <em id="ddm-08-0021__i997511531412">check table</em></pre>
|
||||||
|
<p id="ddm-08-0021__p48551722121215"><strong id="ddm-08-0021__b910922194612">Command Output:</strong></p>
|
||||||
|
<p id="ddm-08-0021__p06194263302">The following output is returned if DDL check results of all logical tables are consistent.</p>
|
||||||
|
<p id="ddm-08-0021__p51012272307"><span><img id="ddm-08-0021__image18244182363518" src="en-us_image_0000001685307210.png"></span></p>
|
||||||
|
<p id="ddm-08-0021__p386503843810">The following output is returned if there are logical tables with inconsistent DDL check results.</p>
|
||||||
|
<p id="ddm-08-0021__p4718117142014"><span><img id="ddm-08-0021__image1471821715207" src="en-us_image_0000001733146277.png"></span></p>
|
||||||
|
<p id="ddm-08-0021__p941994510383"><strong id="ddm-08-0021__b17471618182315">Output Details:</strong></p>
|
||||||
|
<p id="ddm-08-0021__p018843517345">Each row contains the check result of a logical table.</p>
|
||||||
|
<ul id="ddm-08-0021__ul1763524413013"><li id="ddm-08-0021__li6635204414305"><strong id="ddm-08-0021__b124621913155020">DATABASE_NAME</strong>: indicates the schema name.</li><li id="ddm-08-0021__li1613754163014"><strong id="ddm-08-0021__b1820194619503">TABLE_NAME</strong>: indicates the logical table name.</li><li id="ddm-08-0021__li29071545313"><strong id="ddm-08-0021__b12586163911513">TABLE_TYPE</strong>: indicates the logical table type.<ul id="ddm-08-0021__ul88071612103110"><li id="ddm-08-0021__li18553171293117"><strong id="ddm-08-0021__b13561457526">SINGLE</strong>: indicates that the logical table is unsharded.</li><li id="ddm-08-0021__li159693172311"><strong id="ddm-08-0021__b9512165755320">BROADCAST</strong>: indicates that the table is a broadcast table.</li><li id="ddm-08-0021__li37151624103117"><strong id="ddm-08-0021__b19980144310179">SHARDING</strong>: indicates that the table is sharded.</li></ul>
|
||||||
|
</li><li id="ddm-08-0021__li37641240163114"><strong id="ddm-08-0021__b1195591550">DDL_CONSISTENCY</strong>: indicates whether DDL results of all physical tables corresponding to the logical table are consistent.</li><li id="ddm-08-0021__li17845206173217"><strong id="ddm-08-0021__b11266919576">TOTAL_COUNT</strong>: indicates the number of physical tables in the logical table.</li><li id="ddm-08-0021__li218620190321"><strong id="ddm-08-0021__b18840102215716">INCONSISTENT_COUNT</strong>: indicates the number of physical tables with inconsistent DDL results.</li><li id="ddm-08-0021__li124811355143219"><strong id="ddm-08-0021__b56681748165911">DETAILS</strong>: indicates names of the physical tables with inconsistent DDL check results.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0014.html">CHECK TABLE</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
21
docs/ddm/umn/ddm-08-0022.html
Normal file
21
docs/ddm/umn/ddm-08-0022.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<a name="ddm-08-0022"></a><a name="ddm-08-0022"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Checking DDL Consistency of Physical Tables in One Logical Table</h1>
|
||||||
|
<div id="body1599642877312"><p id="ddm-08-0022__p1637718320364"><strong id="ddm-08-0022__b1912013479136">Purpose:</strong> To check DDL consistency of physical tables in a specific logical table</p>
|
||||||
|
<p id="ddm-08-0022__p14863442113015"><strong id="ddm-08-0022__b1869740538">Command Format:</strong></p>
|
||||||
|
<pre class="codeblock" id="ddm-08-0022__codeblock178147173017"><em id="ddm-08-0022__i4965194518416">check table </em><em id="ddm-08-0022__i191194710302"><table_name></em></pre>
|
||||||
|
<p id="ddm-08-0022__p1274668103013"><strong id="ddm-08-0022__b0677184317312">Command Output:</strong></p>
|
||||||
|
<p id="ddm-08-0022__p18570103913335">If the returned result set is empty, DDL results of physical tables in this logical table are consistent.</p>
|
||||||
|
<p id="ddm-08-0022__p48521825103620"><span><img id="ddm-08-0022__image6463033183618" src="en-us_image_0000001733266429.png"></span></p>
|
||||||
|
<p id="ddm-08-0022__p170120263413">If the returned result set is not empty, there are physical tables with inconsistent DDL results.</p>
|
||||||
|
<p id="ddm-08-0022__p62180374333"><span><img id="ddm-08-0022__image189685336394" src="en-us_image_0000001685147494.png"></span></p>
|
||||||
|
<p id="ddm-08-0022__p467723504215"><strong id="ddm-08-0022__b14102183817186">Output Details:</strong></p>
|
||||||
|
<p id="ddm-08-0022__p56397974319">Each row displays details of a physical table with inconsistent DDL results.</p>
|
||||||
|
<ul id="ddm-08-0022__ul527415364219"><li id="ddm-08-0022__li3274155354211"><strong id="ddm-08-0022__b123879122284">DATABASE_NAME</strong>: indicates the database shard containing the physical table.</li><li id="ddm-08-0022__li2816519104316"><strong id="ddm-08-0022__b694284920281">TABLE_NAME</strong>: indicates the name of the physical table.</li><li id="ddm-08-0022__li1553015384436"><strong id="ddm-08-0022__b1142310162917">TABLE_TYPE</strong>: indicates the type of the logical table that the physical table belongs to.</li><li id="ddm-08-0022__li1496125794416"><strong id="ddm-08-0022__b898566123218">EXTRA_COLUMNS</strong>: indicates extra columns in the physical table.</li><li id="ddm-08-0022__li45740236450"><strong id="ddm-08-0022__b18101133233219">MISSING_COLUMNS</strong>: indicates missing columns in the physical table.</li><li id="ddm-08-0022__li690701054517"><strong id="ddm-08-0022__b1591053318338">DIFFERENT_COLUMNS</strong>: indicates name and type columns whose attributes are inconsistent in the physical table.</li><li id="ddm-08-0022__li2061954714455"><strong id="ddm-08-0022__b1157253372">KEY_DIFF</strong>: indicates inconsistent indexes in the physical table.</li><li id="ddm-08-0022__li1293523015545"><strong id="ddm-08-0022__b3554185694015">ENGINE_DIFF</strong>: indicates inconsistent engines in the physical table.</li><li id="ddm-08-0022__li1864915342545"><strong id="ddm-08-0022__b17811171964118">CHARSET_DIFF</strong>: indicates inconsistent character sets in the physical table.</li><li id="ddm-08-0022__li1571617389541"><strong id="ddm-08-0022__b47818518423">COLLATE_DIFF</strong>: indicates inconsistent collations in the physical table.</li><li id="ddm-08-0022__li136025476547"><strong id="ddm-08-0022__b798614418432">EXTRA_PARTITIONS</strong>: indicates extra partitions in the physical table. This field is only available to partitioned tables.</li><li id="ddm-08-0022__li834616494541"><strong id="ddm-08-0022__b0852144674614">MISSING_PARTITIONS</strong>: indicates missing partitions in the physical table. This field is only available to partitioned tables.</li><li id="ddm-08-0022__li108978526542"><strong id="ddm-08-0022__b143251030475">DIFFERENT_PARTITIONS</strong>: indicates partitions with inconsistent attributes in the physical table. This field is only available to partitioned tables.</li><li id="ddm-08-0022__li137019543545"><strong id="ddm-08-0022__b20530161024720">EXTRA_INFO</strong>: indicates other information such as missing physical tables.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0014.html">CHECK TABLE</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
19
docs/ddm/umn/ddm-08-0023.html
Normal file
19
docs/ddm/umn/ddm-08-0023.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<a name="ddm-08-0023"></a><a name="ddm-08-0023"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">TRUNCATE TABLE</h1>
|
||||||
|
<div id="body1600046444819"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0024.html">HINT-DB</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0025.html">HINT-TABLE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-08-0026.html">HINT-DB/TABLE</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
16
docs/ddm/umn/ddm-08-0024.html
Normal file
16
docs/ddm/umn/ddm-08-0024.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<a name="ddm-08-0024"></a><a name="ddm-08-0024"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">HINT-DB</h1>
|
||||||
|
<div id="body1600050169485"><p id="ddm-08-0024__p1757111616590"><strong id="ddm-08-0024__b174116162418">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0024__p986420481142"><strong id="ddm-08-0024__b84121429155">/*+db=</strong><em id="ddm-08-0024__i134131022156"><physical_db_name></em><strong id="ddm-08-0024__b1682915751510">*/ TRUNCATE TABLE </strong><em id="ddm-08-0024__i2830678154"><table_name></em></p>
|
||||||
|
<p id="ddm-08-0024__p9175464010"><strong id="ddm-08-0024__b1897251715245">Description:</strong></p>
|
||||||
|
<p id="ddm-08-0024__p8060118">Deleting data in physical tables corresponding to <em id="ddm-08-0024__i119040351442"><table_name></em> in <em id="ddm-08-0024__i1790653544412"><physical_db_name></em> does not affect physical tables in other database shards.</p>
|
||||||
|
<div class="note" id="ddm-08-0024__note383785817303"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm-08-0024__p108388587304">HINTs are instructions within a SQL statement that tell the optimizer to execute the statement in a flexible way.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0023.html">TRUNCATE TABLE</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
21
docs/ddm/umn/ddm-08-0025.html
Normal file
21
docs/ddm/umn/ddm-08-0025.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<a name="ddm-08-0025"></a><a name="ddm-08-0025"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">HINT-TABLE</h1>
|
||||||
|
<div id="body1600050169485"><p id="ddm-08-0025__p778112619212">HINTs are instructions within a SQL statement that tell the optimizer to execute the statement in a flexible way. This section describes how to use HINT syntax to delete data from a table.</p>
|
||||||
|
<p id="ddm-08-0025__p174162613016"><strong id="ddm-08-0025__b11170520132816">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0025__p19151517111511"><strong id="ddm-08-0025__b53581626111517">/*+table=</strong><em id="ddm-08-0025__i33593266150"><physical_table_name></em><strong id="ddm-08-0025__b843263181512">*/ TRUNCATE TABLE </strong><em id="ddm-08-0025__i543393113159"><table_name></em></p>
|
||||||
|
<p id="ddm-08-0025__p139461421019"><strong id="ddm-08-0025__b56993236284">Description:</strong></p>
|
||||||
|
<p id="ddm-08-0025__p8060118">Deleting data in physical table <em id="ddm-08-0025__i16835417496"><physical_table_name></em> in the current database shard does not affect other physical tables.</p>
|
||||||
|
<p id="ddm-08-0025__p117681729165512"><strong id="ddm-08-0025__b1494774314514">Example output before the table is deleted:</strong></p>
|
||||||
|
<p id="ddm-08-0025__p15383102211595"><span><img id="ddm-08-0025__image138352215915" src="en-us_image_0000001685307430.png"></span></p>
|
||||||
|
<p id="ddm-08-0025__p9707542112113"><strong id="ddm-08-0025__b1120218474512">Example output after the table is deleted:</strong></p>
|
||||||
|
<p id="ddm-08-0025__p1316931052217"><span><img id="ddm-08-0025__image1016819109229" src="en-us_image_0000001733266617.png"></span></p>
|
||||||
|
<div class="note" id="ddm-08-0025__note1462131013712"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm-08-0025__p10832923205916">Hints are valid only for sharded tables.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0023.html">TRUNCATE TABLE</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
16
docs/ddm/umn/ddm-08-0026.html
Normal file
16
docs/ddm/umn/ddm-08-0026.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<a name="ddm-08-0026"></a><a name="ddm-08-0026"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">HINT-DB/TABLE</h1>
|
||||||
|
<div id="body1600050169485"><p id="ddm-08-0026__p6886071116"><strong id="ddm-08-0026__b3761203982913">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0026__p61314913182"><strong id="ddm-08-0026__b15592112012187">/*+db=</strong><em id="ddm-08-0026__i105961920101817"><physical_db_name></em><strong id="ddm-08-0026__b1745172741817">,table=</strong><em id="ddm-08-0026__i16491227191815"><physical_table_name></em><strong id="ddm-08-0026__b85721030131810">*/ TRUNCATE TABLE </strong><em id="ddm-08-0026__i125731330151815"><table_name></em></p>
|
||||||
|
<p id="ddm-08-0026__p1422714101211"><strong id="ddm-08-0026__b36651941192911">Description:</strong></p>
|
||||||
|
<p id="ddm-08-0026__p8060118">Deleting data in physical table <em id="ddm-08-0026__i149174910509"><physical_table_name></em> in database shard <em id="ddm-08-0026__i9362203144812"><physical_db_name></em> does not affect other physical tables.</p>
|
||||||
|
<div class="note" id="ddm-08-0026__note1246562314711"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm-08-0026__p10832923205916">Hints are valid only for sharded tables.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0023.html">TRUNCATE TABLE</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
16
docs/ddm/umn/ddm-08-0027.html
Normal file
16
docs/ddm/umn/ddm-08-0027.html
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<a name="ddm-08-0027"></a><a name="ddm-08-0027"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">HINT- ALLOW_ALTER_RERUN</h1>
|
||||||
|
<div id="body1601175461682"><p id="ddm-08-0027__p105101355135815"><strong id="ddm-08-0027__b2254121020131">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0027__p3261131171814"><strong id="ddm-08-0027__b191721064211">/*+ allow_alter_rerun=true*/</strong><em id="ddm-08-0027__i13371181310215"><ALTER TABLE></em></p>
|
||||||
|
<p id="ddm-08-0027__p19849152614011"><strong id="ddm-08-0027__b3665249164719">Description:</strong></p>
|
||||||
|
<p id="ddm-08-0027__p108481426502">Using this hint ensures that commands can be repeatedly executed, and no error is reported. This hint supports the following ALTER TABLE statements: ADD COLUMN, MODIFY COLUMN, DROP COLUMN, ADD INDEX, DROP INDEX, CHANGE COLUMN, ADD PARTITION, and DROP PARTITION.</p>
|
||||||
|
<p id="ddm-08-0027__p289118391815">Example:</p>
|
||||||
|
<p id="ddm-08-0027__p12437315131617"><strong id="ddm-08-0027__b11839326920">/*+ allow_alter_rerun=true*/ALTER TABLE aaa_tb ADD schoolroll varchar(128) not null comment 'Enrollment data'</strong></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
18
docs/ddm/umn/ddm-08-0029.html
Normal file
18
docs/ddm/umn/ddm-08-0029.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<a name="ddm-08-0029"></a><a name="ddm-08-0029"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">SHOW DATA NODE</h1>
|
||||||
|
<div id="body1600053876218"><p id="ddm-08-0029__p8060118"><strong id="ddm-08-0029__b139411243125410">Command Format:</strong></p>
|
||||||
|
<p id="ddm-08-0029__p35717081316"><strong id="ddm-08-0029__b171210619133">show data node</strong>;</p>
|
||||||
|
<p id="ddm-08-0029__p1556215194018">It is used to view data about database shards in the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0029__p105088934818"><strong id="ddm-08-0029__b1136074995410">Output Details:</strong></p>
|
||||||
|
<p id="ddm-08-0029__p12641185911718"><strong id="ddm-08-0029__b18344137185113">RDS_instance_id</strong>: indicates the ID of the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0029__p1164155918179"><strong id="ddm-08-0029__b63591628115511">PHYSICAL_NODE</strong>: used to view physical databases in the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0029__p1664185981715"><strong id="ddm-08-0029__b03533156558">HOST</strong>: indicates the IP address of the RDS instance.</p>
|
||||||
|
<p id="ddm-08-0029__p156415595175"><strong id="ddm-08-0029__b11546631">PORT</strong>: indicates the port number of the RDS instance.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
23
docs/ddm/umn/ddm_01_0000.html
Normal file
23
docs/ddm/umn/ddm_01_0000.html
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<a name="ddm_01_0000"></a><a name="ddm_01_0000"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Service Overview</h1>
|
||||||
|
<div id="body1553068855233"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0001.html">Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0018.html">Basic Concepts</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0016.html">Core Functions</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0017.html">Product Specifications</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-01-0003.html">Usage Constraints</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0007.html">Regions and AZs</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm-01-0002.html">Application Scenarios</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
24
docs/ddm/umn/ddm_01_0001.html
Normal file
24
docs/ddm/umn/ddm_01_0001.html
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<a name="ddm_01_0001"></a><a name="ddm_01_0001"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Overview</h1>
|
||||||
|
<div id="body1553068858234"><div class="section" id="ddm_01_0001__section168015434812"><h4 class="sectiontitle">Definition</h4><p id="ddm_01_0001__p816643132816">Distributed Database Middleware (DDM) is a MySQL-compatible, distributed middleware service designed for relational databases. It can resolve distributed scaling issues to break through capacity and performance bottlenecks of databases, helping handle highly concurrent access to massive volumes of data.</p>
|
||||||
|
<p id="ddm_01_0001__p95658982">DDM uses a decoupled compute and storage architecture and provides functions such as database and table sharding, read/write splitting, elastic scaling, and sustainable O&M. Management of instance nodes has no impacts on your workloads. You can perform O&M on your databases and read and write data from and to them on the DDM console, just like as operating a single-node MySQL database.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0001__section1584010111191"><h4 class="sectiontitle">Advantages</h4><ul id="ddm_01_0001__ul11346175571214"><li id="ddm_01_0001__li0346165571213">Automatic Database and Table Sharding<p id="ddm_01_0001__p2842172023012"><a name="ddm_01_0001__li0346165571213"></a><a name="li0346165571213"></a>MySQL databases are usually deployed on single nodes. Once a fault occurs, all data may be lost, and your workloads are 100% affected.</p>
|
||||||
|
<p id="ddm_01_0001__p135031321101312">DDM supports automatic database and table sharding to distribute data across multiple data nodes, so impacts on your services are greatly reduced once a fault occurs. It also supports explosive growth of services.</p>
|
||||||
|
</li><li id="ddm_01_0001__li1334635571211">Read/Write Splitting<p id="ddm_01_0001__p135531540141319"><a name="ddm_01_0001__li1334635571211"></a><a name="li1334635571211"></a>DDM can leverage data nodes. If there is still great query pressure after horizontal sharding, you can enable read/write splitting to speed up database processing and access, without the need to reconstruct your service system.</p>
|
||||||
|
</li><li id="ddm_01_0001__li434685541217">Elastic Scaling<p id="ddm_01_0001__p567418380312"><a name="ddm_01_0001__li434685541217"></a><a name="li434685541217"></a>MySQL databases can support only medium- and small-scale service systems because their CPU, memory, and network processing are limited by server configurations and their storage depends on the size of SSD or EVS disks.</p>
|
||||||
|
<p id="ddm_01_0001__p18800655121315">DDM supports both compute and storage scaling. You can add nodes to a DDM instance or scale up its node class. Alternatively, increase shards or data nodes to distribute data from one large table to multiple tables or scale out storage resources as services grow, without worrying about O&M.</p>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0001__section936394811218"><h4 class="sectiontitle">Service Architecture</h4><div class="fignone" id="ddm_01_0001__fig3955117193215"><span class="figcap"><b>Figure 1 </b>DDM service architecture</span><br><span><img id="ddm_01_0001__image6734109191910" src="en-us_image_0000001733266537.png"></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0001__section84661023152410"><h4 class="sectiontitle">How DDM Works</h4><div class="fignone" id="ddm_01_0001__fig646622362415"><span class="figcap"><b>Figure 2 </b>DDM working diagram</span><br><span><img id="ddm_01_0001__image84665238242" src="en-us_image_0000001685307354.png"></span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
14
docs/ddm/umn/ddm_01_0005.html
Normal file
14
docs/ddm/umn/ddm_01_0005.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<a name="ddm_01_0005"></a><a name="ddm_01_0005"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Data Nodes</h1>
|
||||||
|
<div id="body1557802079201"><p id="ddm_01_0005__p152641349542">Constraints on data nodes are as follows:</p>
|
||||||
|
<ul id="ddm_01_0005__ul1933712244543"><li id="ddm_01_0005__li1933752410545">Data nodes can be only RDS for MySQL and GaussDB(for MySQL) instances of versions 5.7 and 8.0.</li><li id="ddm_01_0005__li10357122719543">DDM cannot connect to MySQL instances using SSL connections.</li><li id="ddm_01_0005__li1583123514472">Case sensitivity support cannot be enabled for MySQL instances.<div class="note" id="ddm_01_0005__note47091511212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="ddm_01_0005__ul10709195192110"><li id="ddm_01_0005__li870911518218">If you are using MySQL 5.7, select <strong id="ddm_01_0005__b2908125914593">Case insensitive</strong> for <strong id="ddm_01_0005__b184271429014">Table Name</strong> when you create a MySQL instance, or set <strong id="ddm_01_0005__b637173713584">lower_case_table_names</strong> to <strong id="ddm_01_0005__b183818379584">1</strong> on the <strong id="ddm_01_0005__b9381737205813">Parameters</strong> page after you complete the creation.</li><li id="ddm_01_0005__li67092051162118">If you are using MySQL 8.0, select <strong id="ddm_01_0005__b6339185218115">Case insensitive</strong> for <strong id="ddm_01_0005__b2344052101110">Table Name</strong> when you create a MySQL instance.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</li><li id="ddm_01_0005__li54898336411">Modifying configurations of a data node may result in an exception in using your DDM instance. After the modification, click <strong id="ddm_01_0005__b1066913961014">Synchronize Data Node Information</strong> on the <strong id="ddm_01_0005__b87132041172911">Data Nodes</strong> page to synchronize changes from the data node to DDM.</li><li id="ddm_01_0005__li209742027132412">DDM data nodes do not support GBK character sets.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-01-0003.html">Usage Constraints</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
22
docs/ddm/umn/ddm_01_0007.html
Normal file
22
docs/ddm/umn/ddm_01_0007.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<a name="ddm_01_0007"></a><a name="ddm_01_0007"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Regions and AZs</h1>
|
||||||
|
<div id="body0000001097058855"><div class="section" id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_section388255972712"><h4 class="sectiontitle">Concepts</h4><p id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_p212716216381">The combination of a region and an availability zone (AZ) identifies the location of a data center. You can create resources in a specific AZ in a region.</p>
|
||||||
|
<ul id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_ul86578533460"><li id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_li14657175334618">A region is a geographic area where physical data centers are located. Each region is completely independent, improving fault tolerance and stability. After a resource is created, its region cannot be changed.</li><li id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_li45875020473">An AZ is a physical location using independent power supplies and networks. Faults in an AZ do not affect other AZs. A region can contain multiple AZs, which are physically isolated but interconnected through internal networks. This ensures the independence of AZs and provides low-cost and low-latency network connections.</li></ul>
|
||||||
|
|
||||||
|
<p id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_p1479174514614"><a href="#ddm_01_0007__fig18764197715">Figure 1</a> shows the relationship between regions and AZs.</p>
|
||||||
|
<div class="fignone" id="ddm_01_0007__fig18764197715"><a name="ddm_01_0007__fig18764197715"></a><a name="fig18764197715"></a><span class="figcap"><b>Figure 1 </b>Regions and AZs</span><br><span><img id="ddm_01_0007__image5279105811017" src="en-us_image_0000001733266557.png"></span></div>
|
||||||
|
<p id="ddm_01_0007__p0824335302"></p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_section67281149192216"><h4 class="sectiontitle">Selecting a Region</h4><p id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_p68521454132212">You are advised to select a region close to you or your target users. This reduces network latency and improves access rate.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_section193971112578"><h4 class="sectiontitle">Selecting an AZ</h4><p id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_p859161416717">When determining whether to deploy resources in the same AZ, consider your applications' requirements on disaster recovery (DR) and network latency.</p>
|
||||||
|
<ul id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_ul157203571473"><li id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_li7720175710711">For high DR capability, deploy resources in different AZs in the same region.</li><li id="ddm_01_0007__en-us_topic_0185177741_en-us_topic_0184026189_li109763595719">For low network latency, deploy resources in the same AZ.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
66
docs/ddm/umn/ddm_01_0016.html
Normal file
66
docs/ddm/umn/ddm_01_0016.html
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
<a name="ddm_01_0016"></a><a name="ddm_01_0016"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Core Functions</h1>
|
||||||
|
<div id="body1569294102006">
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_01_0016__table1196173718284" frame="border" border="1" rules="all"><caption><b>Table 1 </b>DDM main functions</caption><thead align="left"><tr id="ddm_01_0016__row096011371281"><th align="left" class="cellrowborder" valign="top" width="28.52%" id="mcps1.4.1.2.3.1.1"><p id="ddm_01_0016__p89601437162814"><strong id="ddm_01_0016__b18555172117347">Function</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="71.48%" id="mcps1.4.1.2.3.1.2"><p id="ddm_01_0016__p096033715281"><strong id="ddm_01_0016__b1549132413414">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm_01_0016__row189611137132813"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p13960203722815">Horizontal sharding</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p19960137192814">Select a sharding key when creating a logical table. DDM will generate a sharding rule and horizontally shard data.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row18961737162814"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p11961937142813">Flexible shard configuration</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p1961193742814">DDM supports both compute and storage scaling. You can add nodes to a DDM instance or scale up its node class. Alternatively, increase shards or data nodes to distribute data from one large table to multiple tables or scale out storage resources. Compute scaling is undetectable to your applications. Storage scaling minimizes service interruption to seconds.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row09612372286"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p696163742812">Distributed transactions</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p1362493920182">DDM processes three types of transactions, including single-shard, FREE, and Extended Architecture (XA).</p>
|
||||||
|
<ul id="ddm_01_0016__ul29298281619"><li id="ddm_01_0016__li1793016281115">Single-shard: Transactions cannot be committed across shards.</li><li id="ddm_01_0016__li149308289119">FREE: Transactions are committed across shards. A transaction is not rolled back when it fails to be executed by any shard, causing data inconsistency.</li><li id="ddm_01_0016__li159301428518">XA: Transactions are committed in two phases. If a transaction fails to be executed by any shard, all work done will be rolled back to ensure data consistency.</li></ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row2961143713288"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p16961173742811">Highly compatible SQL syntax</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p119611237182819">DDM is highly compatible with the MySQL licenses and syntax.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row59611737172817"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p11961937172820">Read and write splitting</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p131853543">Read and write requests can be split without modifying the application code, and this is totally transparent to applications. You only need to create read replicas for a MySQL instance associated with your DDM instance and configure a read policy, and a large number of concurrent requests can read data from those read replicas.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row4961637102813"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p3961837152816">Global sequence</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p7657338">DDM allows you to use globally unique, distributed, and ascending SNs as primary or unique keys or to meet your requirements in specific scenarios.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0016__row323518133304"><td class="cellrowborder" valign="top" width="28.52%" headers="mcps1.4.1.2.3.1.1 "><p id="ddm_01_0016__p1523561323012">DDM console</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="71.48%" headers="mcps1.4.1.2.3.1.2 "><p id="ddm_01_0016__p1123501310301">The DDM console enables you to manage and maintain DDM instances, schemas, and accounts.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0016__section813210514354"><h4 class="sectiontitle">Related Services</h4><ul id="ddm_01_0016__ul940413561401"><li id="ddm_01_0016__li14041656134013"><span class="keyword" id="ddm_01_0016__keyword477118371744">VPC</span><p id="ddm_01_0016__p14041156144019">DDM instances are deployed in an isolated VPC and you can configure IP addresses and bandwidth for accessing these DDM instances and use a security group to control access to them.</p>
|
||||||
|
</li><li id="ddm_01_0016__li5404115614408"><span class="keyword" id="ddm_01_0016__keyword319864211414">ECS</span><p id="ddm_01_0016__p174041056194016">You can access your DDM instance through an ECS.</p>
|
||||||
|
</li><li id="ddm_01_0016__li14818632165611"><span class="keyword" id="ddm_01_0016__keyword18191321569">Relational Database Service (RDS)</span><p id="ddm_01_0016__p1778272512243">After you create a DDM instance, you can associate it with RDS for MySQL instances in the same VPC to obtain separated storage resources.</p>
|
||||||
|
</li><li id="ddm_01_0016__li1985332983916">GaussDB(for MySQL)<p id="ddm_01_0016__p886282993919"><a name="ddm_01_0016__li1985332983916"></a><a name="li1985332983916"></a>After you create a DDM instance, you can associate it with GaussDB(for MySQL) instances in the same VPC to obtain separated storage resources.</p>
|
||||||
|
</li><li id="ddm_01_0016__li480354612416">Cloud Trace Service (CTS)<p id="ddm_01_0016__p19777115784119"><a name="ddm_01_0016__li480354612416"></a><a name="li480354612416"></a>CTS records operations on your DDM resources for later query, audit, and backtrack.</p>
|
||||||
|
</li><li id="ddm_01_0016__li12221153415319">Elastic Load Balance (ELB)<p id="ddm_01_0016__p15221193473115"><a name="ddm_01_0016__li12221153415319"></a><a name="li12221153415319"></a>ELB distributes incoming traffic to multiple backend servers based on the forwarding policy to balance workloads. So, it can expand external service capabilities of DDM and eliminate single points of failure (SPOFs) to improve service availability.</p>
|
||||||
|
</li></ul>
|
||||||
|
<div class="fignone" id="ddm_01_0016__fig19521173510146"><span class="figcap"><b>Figure 1 </b>Relationship among DDM, VPC, ECS, and data nodes</span><br><span><img id="ddm_01_0016__image1154174114130" src="en-us_image_0000001700277302.png"></span></div>
|
||||||
|
<p id="ddm_01_0016__p17978183185"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
48
docs/ddm/umn/ddm_01_0017.html
Normal file
48
docs/ddm/umn/ddm_01_0017.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<a name="ddm_01_0017"></a><a name="ddm_01_0017"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Product Specifications</h1>
|
||||||
|
<div id="body1553068858243"><p id="ddm_01_0017__p169707154018">General-enhanced DDM instances use Intel® Xeon® Scalable processors. Working in high-performance networks, these DDM instances can offer high and stable computing performance, meeting enterprise-class application requirements.</p>
|
||||||
|
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_01_0017__table13189358" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Supported specifications</caption><thead align="left"><tr id="ddm_01_0017__row24749807"><th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.2.2.5.1.1"><p id="ddm_01_0017__p17874757115216"><strong id="ddm_01_0017__b48081020194016">Specification</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.2.2.5.1.2"><p id="ddm_01_0017__p09251123650"><strong id="ddm_01_0017__b5678131310481">Architecture</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.2.5.1.3"><p id="ddm_01_0017__p47145209"><strong id="ddm_01_0017__b36966164010">vCPUs</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="37%" id="mcps1.3.2.2.5.1.4"><p id="ddm_01_0017__p60665573"><strong id="ddm_01_0017__b8423527069107">Memory (GB)</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm_01_0017__row60270212"><td class="cellrowborder" rowspan="3" valign="top" width="32%" headers="mcps1.3.2.2.5.1.1 "><p id="ddm_01_0017__p13662140115214">General-enhanced</p>
|
||||||
|
<p id="ddm_01_0017__p193273510522"></p>
|
||||||
|
<p id="ddm_01_0017__p69321535135213"></p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" rowspan="3" valign="top" width="18%" headers="mcps1.3.2.2.5.1.2 "><p id="ddm_01_0017__p36621140165211">x86</p>
|
||||||
|
<p id="ddm_01_0017__p282915334527"></p>
|
||||||
|
<p id="ddm_01_0017__p082919336520"></p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.2.5.1.3 "><p id="ddm_01_0017__p15884152155812">8</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="37%" headers="mcps1.3.2.2.5.1.4 "><p id="ddm_01_0017__p138841125586">16</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0017__row2327487"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="ddm_01_0017__p988411211589">16</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="ddm_01_0017__p1688411219589">32</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_01_0017__row81831617103513"><td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.1 "><p id="ddm_01_0017__p6884324586">32</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" headers="mcps1.3.2.2.5.1.2 "><p id="ddm_01_0017__p28841329589">64</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
27
docs/ddm/umn/ddm_01_0018.html
Normal file
27
docs/ddm/umn/ddm_01_0018.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<a name="ddm_01_0018"></a><a name="ddm_01_0018"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Basic Concepts</h1>
|
||||||
|
<div id="body0000001076791197"><div class="section" id="ddm_01_0018__section16289103954211"><h4 class="sectiontitle">Data Node</h4><p id="ddm_01_0018__p25611921134614">A data node is the minimum management unit of DDM. Each data node represents an independently running database, and it may be an RDS for MySQL or GaussDB(for MySQL) instance that is associated with your DDM instance. You can create multiple schemas in a DDM instance to manage data nodes and access each data node independently.</p>
|
||||||
|
<div class="note" id="ddm_01_0018__note12161647161816"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_01_0018__p1421774713187">DDM instances do not store service-related data, which is stored in shards of data nodes.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__section14199123618227"><h4 class="sectiontitle">VPC</h4><p id="ddm_01_0018__p22981152102912">A Virtual Private Cloud (VPC) is a private and isolated virtual network. You can configure IP address ranges, subnets, and security groups, assign EIPs, and allocate bandwidth for DDM instances.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__section175691822102912"><h4 class="sectiontitle">Subnet</h4><p id="ddm_01_0018__p049465017518">A subnet is a range of IP addresses, a logical subdivision of an IP network. Subnets are created for a VPC where you will place your DDM instances. Every subnet is defined by a unique CIDR block which cannot be modified once the subnet is created.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__section14974753122914"><h4 class="sectiontitle">Security Group</h4><p id="ddm_01_0018__p475865043212">A security group is a collection of rules for ECSs that have the same security protection requirements and are mutually trusted. After a security group is created, you can add different access rules to the security group, and these rules will apply to all ECSs added to this security group.</p>
|
||||||
|
<p id="ddm_01_0018__p37582506329">Your account automatically comes with a security group by default. The default security group allows all outbound traffic and denies all inbound traffic. Your ECSs in this security group can communicate with each other without the need to add rules.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__section1674526203310"><h4 class="sectiontitle">Parameter Template</h4><p id="ddm_01_0018__p0934173043318">A parameter template acts as a container for configuration values that can be applied to one or more DDM instances. If you want to use your own parameter template, you only need to create a custom parameter template and select it when creating a DDM instance. You can also apply the parameter template to an existing DDM instance.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__section183954718383"><h4 class="sectiontitle">EIP</h4><p id="ddm_01_0018__p15753128193816">The Elastic IP (EIP) service provides independent public IP addresses and bandwidth for Internet access. EIPs can be bound to and unbound from DDM instances.</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0018__en-us_topic_0184026189_section1110135820407"><h4 class="sectiontitle">Region and Endpoint</h4><p id="ddm_01_0018__en-us_topic_0184026189_p361784821111">Before using an API to call resources, you need to specify its region and endpoint. For more details, see <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">Regions and Endpoints</a>.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_01_0000.html">Service Overview</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
19
docs/ddm/umn/ddm_01_0020.html
Normal file
19
docs/ddm/umn/ddm_01_0020.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<a name="ddm_01_0020"></a><a name="ddm_01_0020"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Overview</h1>
|
||||||
|
<div id="body1600421036757"><div class="section" id="ddm_01_0020__section159564611233"><h4 class="sectiontitle">Scenarios</h4><p id="ddm_01_0020__p17133173362012">This section describes how to associate a DDM instance with a data node (RDS for MySQL instance).</p>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0020__section13190143125920"><h4 class="sectiontitle">Process of Using DDM</h4><p id="ddm_01_0020__p619094385917"><a href="ddm_06_0002.html">Step 1: Create a DDM Instance and an RDS for MySQL Instance</a></p>
|
||||||
|
<p id="ddm_01_0020__p4190194355917"><a href="ddm_02_0013.html">Step 2: Create a Schema and Associate It with an RDS for MySQL Instance</a></p>
|
||||||
|
<p id="ddm_01_0020__p21901343165919"><a href="ddm_02_0000.html">Step 3: Create a DDM Account</a></p>
|
||||||
|
<div class="p" id="ddm_01_0020__p7191143185916"><a href="ddm_02_0005.html">Step 4: Log In to the DDM Schema</a><div class="fignone" id="ddm_01_0020__fig141913432597"><span class="figcap"><b>Figure 1 </b>Flowchart for using DDM</span><br><span><img class="eddx" id="ddm_01_0020__image772252023420" src="en-us_image_0000001733146485.png"></span></div>
|
||||||
|
</div>
|
||||||
|
<p id="ddm_01_0020__p5191164385916"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_02_0001.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
75
docs/ddm/umn/ddm_01_0174.html
Normal file
75
docs/ddm/umn/ddm_01_0174.html
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<a name="ddm_01_0174"></a><a name="ddm_01_0174"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Unsupported Features and Limitations</h1>
|
||||||
|
<div id="body0000001251639661"><div class="section" id="ddm_01_0174__section157283220720"><h4 class="sectiontitle">Unsupported Features</h4><ul id="ddm_01_0174__ul057120320715"><li id="ddm_01_0174__li115717321979">Stored procedures</li><li id="ddm_01_0174__li15712329718">Triggers</li><li id="ddm_01_0174__li85719321070">Views</li><li id="ddm_01_0174__li105711532578">Events</li><li id="ddm_01_0174__li85718329712">User-defined functions</li><li id="ddm_01_0174__li165712322716">Foreign key reference and association</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul10571732572"><li id="ddm_01_0174__li1557110329715">Full-text indexes and SPACE functions</li><li id="ddm_01_0174__li135711932370">Temporary tables</li><li id="ddm_01_0174__li1657163220713">Compound statements such as BEGIN...END, LOOP...END LOOP, REPEAT...UNTIL...END REPEAT, and WHILE...DO...END WHILE</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul9571123220711"><li id="ddm_01_0174__li757183217718">Process control statements such as IF and WHILE</li><li id="ddm_01_0174__li16571432571">RESET and FLUSH statements</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul45714321371"><li id="ddm_01_0174__li15571232477">BINLOG statement</li><li id="ddm_01_0174__li1557123218712">HANDLER statement</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul13571732179"><li id="ddm_01_0174__li12571133217716">INSTALL and UNINSTALL PLUGIN statements</li><li id="ddm_01_0174__li2057143213713">Character sets other than ASCII, Latin1, binary, utf8, and utf8mb4</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul10571632475"><li id="ddm_01_0174__li65714326717">SYS schema</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul175711732471"><li id="ddm_01_0174__li1457113321578">Optimizer Trace</li><li id="ddm_01_0174__li1457111327714">X-Protocol</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul7572183211715"><li id="ddm_01_0174__li6572332272">CHECKSUM TABLE syntax</li><li id="ddm_01_0174__li757212328711">Table maintenance statements, including ANALYZE, CHECK, CHECKSUM, OPTIMIZE, and REPAIR TABLE</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul1957219321873"><li id="ddm_01_0174__li696813246433">Statements for assigning a value to or querying variable <strong id="ddm_01_0174__b12646954155915">session</strong><p id="ddm_01_0174__p245864854316">For example:</p>
|
||||||
|
<pre class="screen" id="ddm_01_0174__screen021921214548">set @rowid=0;select @rowid:=@rowid+1,id from user;</pre>
|
||||||
|
</li><li id="ddm_01_0174__li357215321376">SQL statements that use -- or /.../ to comment out a single line or multiple lines of code</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul16572153215711"><li id="ddm_01_0174__li1457233214716">DDM provides incomplete support for system variable queries. The returned values are variable values of RDS instances, instead of DDM kernel variable values. For example, the returned values of SELECT @@autocommit do not indicate the current transaction status.</li><li id="ddm_01_0174__li105721323718">Executing SET syntax to modify global variables</li></ul>
|
||||||
|
<ul id="ddm_01_0174__ul1057214322079"><li id="ddm_01_0174__li175723327720">PARTITION syntax. Partitioned tables are not recommended.</li><li id="ddm_01_0174__li657217327716">LOAD XML statement</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section20247329149"><h4 class="sectiontitle">Unsupported Operators</h4><ul id="ddm_01_0174__ul1843523910148"><li id="ddm_01_0174__li12435839181420">Assignment operator (:=) is not supported.</li><li id="ddm_01_0174__li345424113141">Operator (->) is not supported. This operator can be executed successfully in a single table. An error is reported when this operator is executed in other types of tables.</li><li id="ddm_01_0174__li78904415149">Operator (->>) is not supported. This operator can be executed successfully in a single table. An error is reported when this operator is executed in other types of tables.</li><li id="ddm_01_0174__li13993948201419">Expression IS UNKNOWN</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section1936712443113"><h4 class="sectiontitle">Unsupported Functions</h4><p id="ddm_01_0174__p171670264318">The compute layer of DDM does not support the following functions:</p>
|
||||||
|
<ul id="ddm_01_0174__ul221481393520"><li id="ddm_01_0174__li20214813123516">XML functions</li><li id="ddm_01_0174__li32141913193510">Function <strong id="ddm_01_0174__b1628588161419">ANY_VALUE()</strong></li><li id="ddm_01_0174__li82141413153518">Function <strong id="ddm_01_0174__b549518815384">ROW_COUNT()</strong></li><li id="ddm_01_0174__li20214191313353">Function <strong id="ddm_01_0174__b23241241173814">COMPRESS()</strong></li><li id="ddm_01_0174__li1821419136354">Function <strong id="ddm_01_0174__b18316354183811">SHA()</strong></li><li id="ddm_01_0174__li8215151373517">Function <strong id="ddm_01_0174__b12254101203919">SHA1()</strong></li><li id="ddm_01_0174__li221541383514">Function <strong id="ddm_01_0174__b2054419193914">MD5()</strong></li><li id="ddm_01_0174__li421511130355">Function <strong id="ddm_01_0174__b137001215173918">AES_ENCRYPT()</strong></li><li id="ddm_01_0174__li321519137356">Function <strong id="ddm_01_0174__b18882152218392">AES_DECRYPT()</strong></li><li id="ddm_01_0174__li16883201811378">Aggregate function <strong id="ddm_01_0174__b138741629123916">JSON_OBJECTAGG()</strong></li><li id="ddm_01_0174__li188841318173719">Aggregate function <strong id="ddm_01_0174__b56920256513">JSON_ARRAYAGG()</strong></li><li id="ddm_01_0174__li3884181820376">Aggregate function <strong id="ddm_01_0174__b1850553435117">STD()</strong></li><li id="ddm_01_0174__li1388511815374">Aggregate function <strong id="ddm_01_0174__b32401847165111">STDDEV()</strong></li><li id="ddm_01_0174__li5885718123716">Aggregate function <strong id="ddm_01_0174__b6243155613515">STDDEV_POP()</strong></li><li id="ddm_01_0174__li48854185375">Aggregate function <strong id="ddm_01_0174__b573211355219">STDDEV_SAMP()</strong></li><li id="ddm_01_0174__li14886218133716">Aggregate function <strong id="ddm_01_0174__b78744118522">VAR_POP()</strong></li><li id="ddm_01_0174__li1988620181375">Aggregate function <strong id="ddm_01_0174__b193492194522">VAR_SAMP()</strong></li><li id="ddm_01_0174__li1288713180371">Aggregate function <strong id="ddm_01_0174__b67521277524">VARIANCE()</strong></li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section3176154993812"><h4 class="sectiontitle">SQL Syntax</h4><p id="ddm_01_0174__p415475134013"><strong id="ddm_01_0174__b03445447425">SELECT</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul52148407421"><li id="ddm_01_0174__li421474015421">DISTINCTROW</li><li id="ddm_01_0174__li121414017428">Configuring options [HIGH_PRIORITY], [STRAIGHT_JOIN], [SQL_SMALL_RESULT], [SQL_BIG_RESULT], [SQL_BUFFER_RESULT], and [SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] in SELECT statements on DDM instances</li><li id="ddm_01_0174__li4214840114210">SELECT ... GROUP BY ... WITH ROLLUP</li><li id="ddm_01_0174__li1921414014217">SELECT ... ORDER BY ... WITH ROLLUP</li><li id="ddm_01_0174__li821474084210">WITH</li><li id="ddm_01_0174__li8214144044217">Window functions</li><li id="ddm_01_0174__li14214104014211">SELECT FOR UPDATE supports only simple queries and does not support statements such as JOIN, GROUP BY, ORDER BY, and LIMIT. Option [NOWAIT | SKIP LOCKED] for modifying FOR UPDATE is invalid for DDM.</li><li id="ddm_01_0174__li1420221819103">DDM does not support multiple columns with the same name for each SELECT statement in UNION. Duplicate column names are used in the following SELECT statement:<pre class="screen" id="ddm_01_0174__screen7880142101217">SELECT id, id, name FROM t1 UNION SELECT pk, pk, name FROM t2;</pre>
|
||||||
|
</li></ul>
|
||||||
|
<p id="ddm_01_0174__p1620614127518"><strong id="ddm_01_0174__b13617115714011">SORT and LIMIT</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul136971347155120"><li id="ddm_01_0174__li1697204775111">LIMIT/OFFSET, value range: 0–2147483647</li></ul>
|
||||||
|
<p id="ddm_01_0174__p118352725219"><strong id="ddm_01_0174__b57951010114211">Aggregation</strong></p>
|
||||||
|
<div class="p" id="ddm_01_0174__p730910811418">Function <strong id="ddm_01_0174__b65984249180">asc</strong> or <strong id="ddm_01_0174__b459832421817">desc</strong> cannot be used in the GROUP BY statement to sort out results.<div class="note" id="ddm_01_0174__note165913210564"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="ddm_01_0174__ul99347542576"><li id="ddm_01_0174__li8935155416579">DDM automatically ignores keyword <strong id="ddm_01_0174__b198011538131811">asc</strong> or <strong id="ddm_01_0174__b20570184181811">desc</strong> after GROUP BY.</li><li id="ddm_01_0174__li149351554125720">In MySQL versions earlier than 8.0.13, function <strong id="ddm_01_0174__b0337193101919">asc</strong> or <strong id="ddm_01_0174__b8985125151915">desc</strong> can be used in the GROUP BY statement to sort out results. In MySQL 8.0.13 or later, a syntax error is reported if you use function <strong id="ddm_01_0174__b11968203120194">asc</strong> or <strong id="ddm_01_0174__b118491734131912">desc</strong> this way. ORDER BY is recommended for sorting.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
<p id="ddm_01_0174__p76841239145313"><strong id="ddm_01_0174__b0155113184010">Subqueries</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul17741175415"><li id="ddm_01_0174__li17742010543">Subqueries that join grandparent queries are not supported.</li><li id="ddm_01_0174__li074217540">Using subqueries in the HAVING clause and the JOIN ON condition is not supported.</li><li id="ddm_01_0174__li57451115419">Each derived table must have an alias.</li><li id="ddm_01_0174__li67515120549">A derived table cannot be a correlated subquery.</li></ul>
|
||||||
|
<p id="ddm_01_0174__p10639175516572"><strong id="ddm_01_0174__b55544485611">LOAD DATA</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul20109820125819"><li id="ddm_01_0174__li7615184019393">LOW_PRIORITY is not supported.</li><li id="ddm_01_0174__li6737195583919">CONCURRENT is not supported.</li><li id="ddm_01_0174__li97314104012">PARTITION (partition_name [, partition_name] ...) is not supported.</li><li id="ddm_01_0174__li8540151215447">LINES STARTING BY 'string' is not supported.</li><li id="ddm_01_0174__li761442174417">User-defined variables are not supported.</li><li id="ddm_01_0174__li443884114515">ESCAPED BY supports only '\\'.</li><li id="ddm_01_0174__li1546101424520">If you have not specified a value for your auto-increment key when you insert a data record, DDM will not fill a value for the key. The auto-increment keys of data nodes of a DDM instance all take effect, so the auto-increment key values may be duplicate.</li><li id="ddm_01_0174__li152397175459">If the primary key or unique index is not routed to the same physical table, REPLACE does not take effect.</li><li id="ddm_01_0174__li19357203119455">If the primary key or unique index is not routed to the same physical table, IGNORE does not take effect.</li></ul>
|
||||||
|
<p id="ddm_01_0174__p0633346155818"><strong id="ddm_01_0174__b1642174121216">INSERT and REPLACE</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul8195454708"><li id="ddm_01_0174__li1619535417011">INSERT DELAYED is not supported.</li><li id="ddm_01_0174__li15195185415014">Only INSERT statements that contain sharding fields are supported.</li><li id="ddm_01_0174__li1519525417010">PARTITION syntax is not supported. Partitioned tables are not recommended.</li><li id="ddm_01_0174__li111951554101">Setting <strong id="ddm_01_0174__b12502191111279">YYYY</strong> of <strong id="ddm_01_0174__b12634912192218">datetime</strong> (in the format of <strong id="ddm_01_0174__b88424612411">YYYY-MM-DD HH:MM:SS</strong>) to <strong id="ddm_01_0174__b1044131613227">1582</strong> or any value smaller in INSERT statements is not supported.</li><li id="ddm_01_0174__li9195185413012">Nesting a subquery in ON DUPLICATE KEY UPDATE of an INSERT statement is not supported. The following is an example:<pre class="screen" id="ddm_01_0174__screen1165911531922">INSERT INTO t1(a, b)
|
||||||
|
SELECT * FROM(SELECT c, d FROM t2 UNION SELECT e, f FROM t3) AS dt
|
||||||
|
ON DUPLICATE KEY UPDATE b = b + c;</pre>
|
||||||
|
<p id="ddm_01_0174__p466419132816">Subquery c is used in the ON DUPLICATE KEY UPDATE clause.</p>
|
||||||
|
</li><li id="ddm_01_0174__li16197954703">The sharding key values in INSERT and REPLACE statements cannot be <strong id="ddm_01_0174__b17840173512515">DEFAULT</strong>.</li></ul>
|
||||||
|
<p id="ddm_01_0174__p11788135912520"><strong id="ddm_01_0174__b371011383257">UPDATE and DELETE</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul044555616815"><li id="ddm_01_0174__li144453561889">Updating a sharding key value to <strong id="ddm_01_0174__b7215153102319">DEFAULT</strong> is not supported.</li><li id="ddm_01_0174__li444515616816">Repeatedly updating the same field in one SQL statement is not supported.</li><li id="ddm_01_0174__li4445155614811">Updating a sharding key using UPDATE JOIN is not supported. The following is an example:<pre class="screen" id="ddm_01_0174__screen113610304918">UPDATE tbl_1 a, tbl_2 b set a.name=b.name where a.id=b.id;</pre>
|
||||||
|
<p id="ddm_01_0174__p1257515419298"><strong id="ddm_01_0174__b20367174605413">name</strong> indicates the sharding key of table <strong id="ddm_01_0174__b93671746145418">tbl_1</strong>.</p>
|
||||||
|
</li><li id="ddm_01_0174__li7445105619820">Updating a sharding key by executing INSERT ON DUPLICATE KEY UPDATE is not supported.</li><li id="ddm_01_0174__li735355571017">Updating self-joins is not supported.<pre class="screen" id="ddm_01_0174__screen1767811312116">UPDATE tbl_1 a, tbl_1 b set a.tinyblob_col=concat(b.tinyblob_col, 'aaabbb');</pre>
|
||||||
|
</li><li id="ddm_01_0174__li11422019121118">UPDATE JOIN supports only joins with WHERE conditions.<div class="p" id="ddm_01_0174__p14752133422510"><a name="ddm_01_0174__li11422019121118"></a><a name="li11422019121118"></a>The following is an example:<pre class="screen" id="ddm_01_0174__screen17249365117">UPDATE tbl_3, tbl_4 SET tbl_3.varchar_col='dsgfdg';</pre>
|
||||||
|
</div>
|
||||||
|
</li><li id="ddm_01_0174__li14147134131114">Referencing other object columns in assignment statements or expressions is not supported when UPDATE JOIN syntax is used. The following is an example:<pre class="screen" id="ddm_01_0174__screen2990185151217">UPDATE tbl_1 a, tbl_2 b SET a.name=concat(b.name, 'aaaa'),b.name=concat(a.name, 'bbbb') ON a.id=b.id;</pre>
|
||||||
|
</li><li id="ddm_01_0174__li36369393287">You can update a sharding field by two steps: delete the original sharding field and then insert a new field. During this process, the results of querying the sharding fields involved in the target table may be inconsistent.</li></ul>
|
||||||
|
</div>
|
||||||
|
<p id="ddm_01_0174__p8060118"><strong id="ddm_01_0174__b1432220263150">DDL</strong></p>
|
||||||
|
<ul id="ddm_01_0174__ul43022058162"><li id="ddm_01_0174__li1730235181614">SQL statements for modifying database names and sharding field names and types</li><li id="ddm_01_0174__li143028511610">SQL statements for creating and deleting schemas</li><li id="ddm_01_0174__li1130215513166">Index FULL_TEXT</li><li id="ddm_01_0174__li730265191614">AS SELECT clause of the CREATE TABLE statement</li><li id="ddm_01_0174__li13028517162">CREATE TABLE ... LIKE statement</li><li id="ddm_01_0174__li1230295141616">Dropping multiple tables with one SQL statement</li><li id="ddm_01_0174__li530311501612">Executing multiple SQL statements at the same time</li><li id="ddm_01_0174__li43031153162">Creating foreign keys for broadcast and sharded tables</li><li id="ddm_01_0174__li03035591612">Creating tables whose names are prefixed by <strong id="ddm_01_0174__b1311874914815">_ddm</strong></li><li id="ddm_01_0174__li7303757165">Creating temporary sharded or broadcast tables</li><li id="ddm_01_0174__li10663121723317">Specifying globally unique keys in the CREATE TABLE statement</li></ul>
|
||||||
|
<div class="section" id="ddm_01_0174__section984261912355"><h4 class="sectiontitle">Indexes</h4><ul id="ddm_01_0174__ul13619164816398"><li id="ddm_01_0174__li261964819396">Global secondary indexes</li><li id="ddm_01_0174__li1561913487399">Global unique indexes. Unique keys and primary keys may not be globally unique.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section1077351218217"><h4 class="sectiontitle">Table Recycle Bins</h4><ul id="ddm_01_0174__ul16354613216"><li id="ddm_01_0174__li143946132115">Hints</li><li id="ddm_01_0174__li1338461212">Deleting tables by schema</li><li id="ddm_01_0174__li113846132114">Deleting tables by logical table</li><li id="ddm_01_0174__li1031946152113">After a table is recovered, its globally unique sequence increases automatically but may not follow the last sequence value.</li><li id="ddm_01_0174__li1931462219">Shard configuration</li><li id="ddm_01_0174__li9384613219">Retaining copies with no time limit</li><li id="ddm_01_0174__li4313468214">Recovering data to a table with any name</li><li id="ddm_01_0174__li8317464219">Unlimited copies</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section14651243152416"><h4 class="sectiontitle">Transactions</h4><ul id="ddm_01_0174__ul660519817252"><li id="ddm_01_0174__li1460638162517">Savepoints</li><li id="ddm_01_0174__li11606087256">XA syntax. DDM has implemented distributed transactions through XA, so the user layer does not need to process the syntax.</li><li id="ddm_01_0174__li560688112514">Customizing the isolation level of a transaction. Currently, DDM supports only the READ COMMITTED isolation level. In consideration of compatibility, DDM does not report errors for any SQL statement (such as SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ) to set the database isolation level, but will ignore the modifications to the transaction isolation level.</li><li id="ddm_01_0174__li06067812510">Setting a transaction to read-only (START TRANSACTION READ ONLY). DDM can enable read/write of a transaction, instead of enabling read-only, to ensure compatibility.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section11511652132510"><h4 class="sectiontitle">Permissions</h4><ul id="ddm_01_0174__ul43241254112512"><li id="ddm_01_0174__li1932445422517">Column-level permissions</li><li id="ddm_01_0174__li732455419255">Subprogram-level permissions</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section15861173614265"><h4 class="sectiontitle">Database Management Statements</h4><ul id="ddm_01_0174__ul55682179279"><li id="ddm_01_0174__li125681017182711">SHOW TRIGGERS</li><li id="ddm_01_0174__li3569121710277">Most of SHOW statements such as SHOW PROFILES, SHOW ERRORS, and SHOW WARNINGS</li><li id="ddm_01_0174__li105691117162715">The following SHOW statements are randomly sent to a database shard. If database shards are on different RDS for MySQL instances, the returned variables or table information may be different.<ul id="ddm_01_0174__ul13834124152715"><li id="ddm_01_0174__li65461138162712">SHOW TABLE STATUS;</li><li id="ddm_01_0174__li35495382279">SHOW VARIABLES Syntax;</li><li id="ddm_01_0174__li11551738182713">SHOW WARNINGS Syntax does not support the combination of LIMIT and COUNT.</li><li id="ddm_01_0174__li35514387274">SHOW ERRORS Syntax does not support the combination of LIMIT and COUNT.</li></ul>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section151251738122816"><h4 class="sectiontitle">INFORMATION_SCHEMA</h4><ul id="ddm_01_0174__ul18467342916"><li id="ddm_01_0174__li384619322914">Only simple queries of SCHEMATA, TABLES, COLUMNS, STATISTICS, and PARTITIONS are supported. No subqueries, JOINs, aggregate functions, ORDER BY, and LIMIT are allowed.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_01_0174__section168961935135017"><h4 class="sectiontitle">Broadcast Tables</h4><p id="ddm_01_0174__p3622754683">If a broadcast table is used, do not use any function that has different results returned each time it is executed. Otherwise, data inconsistency will occur between different shards. If such functions are indeed required, calculate their results, write the results to your SQL statements, and then execute the SQL statements on the broadcast table. Functions of this type include but are not limited to the following:</p>
|
||||||
|
<ul id="ddm_01_0174__ul19559151810582"><li id="ddm_01_0174__li3559121875819">CONNECTION_ID()</li><li id="ddm_01_0174__li2559181818587">CURDATE()</li><li id="ddm_01_0174__li12559818135811">CURRENT_DATE()</li><li id="ddm_01_0174__li105592183583">CURRENT_TIME()</li><li id="ddm_01_0174__li1855981812583">CURRENT_TIMESTAMP()</li><li id="ddm_01_0174__li1055991811587">CURTIME()</li><li id="ddm_01_0174__li35590181586">LAST_INSERT_ID()</li><li id="ddm_01_0174__li1355914181583">LOCALTIME()</li><li id="ddm_01_0174__li135591418205818">LOCALTIMESTAMP()</li><li id="ddm_01_0174__li1455911186587">NOW()</li><li id="ddm_01_0174__li355921818586">UNIX_TIMESTAMP()</li><li id="ddm_01_0174__li3559218195811">UTC_DATE()</li><li id="ddm_01_0174__li6559151865820">UTC_TIME()</li><li id="ddm_01_0174__li955951818584">UTC_TIMESTAMP()</li><li id="ddm_01_0174__li16559191815581">CURRENT_ROLE()</li><li id="ddm_01_0174__li1255915183581">CURRENT_USER()</li><li id="ddm_01_0174__li95591018115818">FOUND_ROWS()</li><li id="ddm_01_0174__li6559181815588">GET_LOCK()</li><li id="ddm_01_0174__li15559218175818">IS_FREE_LOCK()</li><li id="ddm_01_0174__li6559101815816">IS_USED_LOCK()</li><li id="ddm_01_0174__li185591218145816">JSON_TABLE()</li><li id="ddm_01_0174__li19559131814589">LOAD_FILE()</li><li id="ddm_01_0174__li65591218115818">MASTER_POS_WAIT()</li><li id="ddm_01_0174__li1055991815813">RAND()</li><li id="ddm_01_0174__li1455981812582">RELEASE_ALL_LOCKS()</li><li id="ddm_01_0174__li14559181814581">RELEASE_LOCK()</li><li id="ddm_01_0174__li655910186580">ROW_COUNT()</li><li id="ddm_01_0174__li185596184583">SESSION_USER()</li><li id="ddm_01_0174__li35594181587">SLEEP()</li><li id="ddm_01_0174__li1755981835813">SYSDATE()</li><li id="ddm_01_0174__li16559018145820">SYSTEM_USER()</li><li id="ddm_01_0174__li255918186580">USER()</li><li id="ddm_01_0174__li20559141835810">UUID()</li><li id="ddm_01_0174__li7559171811587">UUID_SHORT()</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-01-0003.html">Usage Constraints</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
12
docs/ddm/umn/ddm_01_0175.html
Normal file
12
docs/ddm/umn/ddm_01_0175.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<a name="ddm_01_0175"></a><a name="ddm_01_0175"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">High-risk Operations</h1>
|
||||||
|
<div id="body0000001259256947"><p id="ddm_01_0175__p1250415141889">Pay attention to the following when you use DDM:</p>
|
||||||
|
<ul id="ddm_01_0175__ul107331533141111"><li id="ddm_01_0175__li67331233101115">Do not connect to any data node for data operations to avoid deleting by mistake system catalogs or metadata.</li><li id="ddm_01_0175__li167331332119">Do not clear system tables <strong id="ddm_01_0175__b695017151514">TBL_DRDS_TABLE</strong> and <strong id="ddm_01_0175__b4951315195116">MYCAT_SEQUENCE</strong> to prevent metadata loss.</li></ul>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-01-0003.html">Usage Constraints</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
55
docs/ddm/umn/ddm_02_0000.html
Normal file
55
docs/ddm/umn/ddm_02_0000.html
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<a name="ddm_02_0000"></a><a name="ddm_02_0000"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Step 3: Create a DDM Account</h1>
|
||||||
|
<div id="body1603952513953"><div class="section" id="ddm_02_0000__section18952118124916"><h4 class="sectiontitle">Procedure</h4><ol id="ddm_02_0000__ol172601822134919"><li id="ddm_02_0000__li18845223192514"><span>Log in to the DDM console, in the instance list, locate the required DDM instance and click its name.</span></li><li id="ddm_02_0000__li16917753172513"><span>In the navigation pane, choose <strong id="ddm_02_0000__b107222561541">Accounts</strong>.</span></li><li id="ddm_02_0000__li12604227495"><span>On the displayed page, click <strong id="ddm_02_0000__b10836121961611">Create Account</strong> and configure required parameters.</span><p>
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_02_0000__table184114346315" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Required parameters</caption><thead align="left"><tr id="ddm_02_0000__row98391534173115"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.1.2.3.2.1.2.3.1.1"><p id="ddm_02_0000__p15839193411319"><strong id="ddm_02_0000__b798418165514">Parameter</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="79%" id="mcps1.3.1.2.3.2.1.2.3.1.2"><p id="ddm_02_0000__p38391734183114"><strong id="ddm_02_0000__b194240181517">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm_02_0000__row188411434143117"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p684153453112">Username</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p1780015387516">Username of the account.</p>
|
||||||
|
<p id="ddm_02_0000__p1848581212017">The username can include 1 to 32 characters and must start with a letter. Only letters, digits, and underscores (_) are allowed.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0000__row98411634103118"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p484173483118">Password</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p148412034113119">Password of the account. The password:</p>
|
||||||
|
<ul id="ddm_02_0000__ul449210258508"><li id="ddm_02_0000__li16492172555020">Can include 8 to 32 characters.</li><li id="ddm_02_0000__li3532123535015">Must contain at least three of the following character types: letters, digits, and special characters ~!@#%^*-_=+?</li><li id="ddm_02_0000__li104682815512">Cannot be a weak password. It cannot be overly simple and easily guessed.</li></ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0000__row1684143463118"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p15841183453111">Confirm Password</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p12841183433118">The confirm password must be the same as the entered password.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0000__row19792241185513"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p684143418318">Schema</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p78418343314">Schema to be associated with the DDM account. You can select an existing schema from the drop-down list.</p>
|
||||||
|
<p id="ddm_02_0000__p08411134123118">Only the associated schemas can be accessed using the account.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0000__row0533163934910"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p15352390493">Permissions</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p10677144773215">Options: <strong id="ddm_02_0000__b16394746121112">CREATE</strong>, <strong id="ddm_02_0000__b2407546191115">DROP</strong>, <strong id="ddm_02_0000__b134091846181111">ALTER</strong>, <strong id="ddm_02_0000__b19410146101111">INDEX</strong>, <strong id="ddm_02_0000__b1641154621113">INSERT</strong>, <strong id="ddm_02_0000__b164135467113">DELETE</strong>, <strong id="ddm_02_0000__b1641494681112">UPDATE</strong>, and <strong id="ddm_02_0000__b1841514613111">SELECT</strong>. You can select any or a combination of them.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0000__row14841143403119"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.1.2.3.2.1.2.3.1.1 "><p id="ddm_02_0000__p1084163493116">Description</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="79%" headers="mcps1.3.1.2.3.2.1.2.3.1.2 "><p id="ddm_02_0000__p1184116343318">Description of the account, which cannot exceed 256 characters.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</p></li><li id="ddm_02_0000__li42661747545"><span>Click <strong id="ddm_02_0000__b886613112610">OK</strong>.</span></li></ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_02_0001.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
19
docs/ddm/umn/ddm_02_0001.html
Normal file
19
docs/ddm/umn/ddm_02_0001.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<a name="ddm_02_0001"></a><a name="ddm_02_0001"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Getting Started</h1>
|
||||||
|
<div id="body432444"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_01_0020.html">Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_06_0002.html">Step 1: Create a DDM Instance and an RDS for MySQL Instance</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_02_0013.html">Step 2: Create a Schema and Associate It with an RDS for MySQL Instance</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_02_0000.html">Step 3: Create a DDM Account</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_02_0005.html">Step 4: Log In to the DDM Schema</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
124
docs/ddm/umn/ddm_02_0005.html
Normal file
124
docs/ddm/umn/ddm_02_0005.html
Normal file
File diff suppressed because it is too large
Load Diff
50
docs/ddm/umn/ddm_02_0013.html
Normal file
50
docs/ddm/umn/ddm_02_0013.html
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<a name="ddm_02_0013"></a><a name="ddm_02_0013"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Step 2: Create a Schema and Associate It with an RDS for MySQL Instance</h1>
|
||||||
|
<div id="body1603952513953"><div class="section" id="ddm_02_0013__section1245627535"><h4 class="sectiontitle">Procedure</h4><ol id="ddm_02_0013__ol195402921411"><li id="ddm_02_0013__li1095412915144"><span>Log in to the DDM console, and in the navigation pane, choose <strong id="ddm_02_0013__b178543213563">Instances</strong>. In the instance list, locate the required DDM instance and click <strong id="ddm_02_0013__b17854721568">Create Schema</strong> in the <strong id="ddm_02_0013__b185411265613">Operation</strong> column.</span></li><li id="ddm_02_0013__li13864105241412"><span>On the displayed page, specify a sharding mode, enter a schema name, set the number of shards, select the required DDM accounts, and click <strong id="ddm_02_0013__b162611041153017">Next</strong>.</span><p>
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_02_0013__table5532135017574" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="ddm_02_0013__row353345017579"><th align="left" class="cellrowborder" valign="top" width="23.76%" id="mcps1.3.1.2.2.2.1.2.3.1.1"><p id="ddm_02_0013__p95331750165712"><strong id="ddm_02_0013__b187871517102210">Parameter</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="76.24%" id="mcps1.3.1.2.2.2.1.2.3.1.2"><p id="ddm_02_0013__p10533105095717"><strong id="ddm_02_0013__b19651132122213">Description</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm_02_0013__row19533125035715"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.1.2.2.2.1.2.3.1.1 "><p id="ddm_02_0013__p753365017575">Sharding</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.1.2.2.2.1.2.3.1.2 "><ul id="ddm_02_0013__ul74001251212"><li id="ddm_02_0013__li1340016520112"><strong id="ddm_02_0013__b19082211467">Sharded</strong>: indicates that one schema can be associated with multiple data nodes, and all shards will be evenly distributed across the nodes.</li><li id="ddm_02_0013__li1400051416"><strong id="ddm_02_0013__b29488376447">Unsharded</strong>: indicates that one schema can be associated with only one data node, and only one shard can be created on the data node.</li></ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0013__row125331450105711"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.1.2.2.2.1.2.3.1.1 "><p id="ddm_02_0013__p195331650125715">Schema</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.1.2.2.2.1.2.3.1.2 "><p id="ddm_02_0013__p19533150125714">The name contains 2 to 48 characters and must start with a lowercase letter. Only lowercase letters, digits, and underscores (_) are allowed.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0013__row11533155025710"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.1.2.2.2.1.2.3.1.1 "><p id="ddm_02_0013__p65331550125713">Account</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.1.2.2.2.1.2.3.1.2 "><p id="ddm_02_0013__p5533165019574">The DDM account that needs to be associated with the schema.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0013__row14487127903"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.1.2.2.2.1.2.3.1.1 "><p id="ddm_02_0013__p1648719713012">Data Nodes</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.1.2.2.2.1.2.3.1.2 "><p id="ddm_02_0013__p448716717013">Select only the data nodes that are in the same VPC as your DDM instance and not in use by other data nodes. DDM will create databases on the selected data nodes without affecting their existing databases and tables.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr id="ddm_02_0013__row74831942144811"><td class="cellrowborder" valign="top" width="23.76%" headers="mcps1.3.1.2.2.2.1.2.3.1.1 "><p id="ddm_02_0013__p453318500570">Shards</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="76.24%" headers="mcps1.3.1.2.2.2.1.2.3.1.2 "><p id="ddm_02_0013__p853114211518">The total shards are the shards on all data nodes. There cannot be more data nodes than there are shards in the schema. Each data node must have at least one shard assigned. Recommended shards per data node: 8 to 64.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</p></li><li id="ddm_02_0013__li756113429617"><span>On the <strong id="ddm_02_0013__b1284345204612">DB Instance Connection</strong> page, enter a database account with the required permissions and click <strong id="ddm_02_0013__b87721274107">Test Connection</strong>.</span><p><div class="note" id="ddm_02_0013__note1996912118499"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_02_0013__p92815579535">Required permissions: SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER WITH GRANT OPTION</p>
|
||||||
|
<p id="ddm_02_0013__p590985054416">You can create a database account for the RDS for MySQL instance and assign it the above permissions in advance.</p>
|
||||||
|
</div></div>
|
||||||
|
</p></li><li id="ddm_02_0013__li13482122095216"><span>After the test becomes successful, click <strong id="ddm_02_0013__b733761343512">Finish</strong>.</span></li></ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_02_0001.html">Getting Started</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
19
docs/ddm/umn/ddm_03_0006.html
Normal file
19
docs/ddm/umn/ddm_03_0006.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<a name="ddm_03_0006"></a><a name="ddm_03_0006"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Schema Management</h1>
|
||||||
|
<div id="body1587888869789"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_06_0006.html">Creating a Schema</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_06_0015.html">Exporting Schema Information</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_06_0007.html">Importing Schema Information</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0008.html">Deleting a Schema</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0100.html">Configuring the SQL Blacklist</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
18
docs/ddm/umn/ddm_03_0008.html
Normal file
18
docs/ddm/umn/ddm_03_0008.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<a name="ddm_03_0008"></a><a name="ddm_03_0008"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Deleting a Schema</h1>
|
||||||
|
<div id="body1585554409299"><div class="section" id="ddm_03_0008__section1539512419299"><h4 class="sectiontitle">Prerequisites</h4><ul id="ddm_03_0008__ul17317123816495"><li id="ddm_03_0008__li14317133816491">You have logged in to the DDM console.</li><li id="ddm_03_0008__li431711381496">You have created a schema.<div class="notice" id="ddm_03_0008__note17635846165012"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="ddm_03_0008__p2635746115012">Deleted schemas cannot be recovered. Exercise caution when performing this operation.</p>
|
||||||
|
</div></div>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_03_0008__section18952118124916"><h4 class="sectiontitle">Procedure</h4><ol id="ddm_03_0008__ol172601822134919"><li id="ddm_03_0008__li18845223192514"><span>In the instance list, locate the DDM instance that you want to delete and click its name.</span></li><li id="ddm_03_0008__li16917753172513"><span>On the displayed page, in the navigation pane, choose <strong id="ddm_03_0008__b995115131370">Schemas</strong>.</span></li><li id="ddm_03_0008__li12604227495"><span>In the schema list, locate the schema that you want to delete and click <strong id="ddm_03_0008__b16815724103810">Delete</strong> in the <strong id="ddm_03_0008__b257982843814">Operation</strong> column.</span></li><li id="ddm_03_0008__li1377372025010"><span>In the displayed dialog box, click <strong id="ddm_03_0008__b2086023073813">Yes</strong>.</span><p><div class="note" id="ddm_03_0008__note1077153617518"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="ddm_03_0008__ul159145513552"><li id="ddm_03_0008__li14307337776">Your schema will become faulty if you delete its associated data nodes by clicking the <strong id="ddm_03_0008__b4979191562814">Delete</strong> button in the schema list.</li><li id="ddm_03_0008__li9915205118556">To delete data stored on the associated data nodes, select <strong id="ddm_03_0008__b746035814313">Delete data on data nodes</strong> in the displayed dialog box.</li></ul>
|
||||||
|
</div></div>
|
||||||
|
</p></li></ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm_03_0006.html">Schema Management</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
19
docs/ddm/umn/ddm_03_0030.html
Normal file
19
docs/ddm/umn/ddm_03_0030.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<a name="ddm_03_0030"></a><a name="ddm_03_0030"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Global Sequence</h1>
|
||||||
|
<div id="body1597045079950"></div>
|
||||||
|
<div>
|
||||||
|
<ul class="ullinks">
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_12_0010.html">Overview</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0036.html">Using NEXTVAL or CURRVAL to Query Global Sequence Numbers</a></strong><br>
|
||||||
|
</li>
|
||||||
|
<li class="ulchildlink"><strong><a href="ddm_03_0037.html">Using Global Sequences in INSERT or REPLACE Statements</a></strong><br>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
30
docs/ddm/umn/ddm_03_0031.html
Normal file
30
docs/ddm/umn/ddm_03_0031.html
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<a name="ddm_03_0031"></a><a name="ddm_03_0031"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">LOAD DATA</h1>
|
||||||
|
<div id="body1597045079951"><div class="section" id="ddm_03_0031__s8fd2b790d2f142e390a1b9f1e18ae2d7"><h4 class="sectiontitle">Standard Example</h4><p id="ddm_03_0031__p11944104115499">LOAD DATA LOCAL INFILE '/data/data.txt' IGNORE INTO TABLE test CHARACTER SET 'utf8' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' (id, sid, asf);</p>
|
||||||
|
</div>
|
||||||
|
<div class="note" id="ddm_03_0031__n76f3bfb0d6d84644b81090485adf669e"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_03_0031__p132788251228">If a data field contains special characters like separators and escapes, execute OPTIONALLY ENCLOSED BY '"' to enclose the field with double quotation marks ("").</p>
|
||||||
|
<p id="ddm_03_0031__p172210217215">Example:</p>
|
||||||
|
<p id="ddm_03_0031__p13316171821617">The following data field contains separators (,) and is enclosed with quotation marks:</p>
|
||||||
|
<p id="ddm_03_0031__p11626734141419"><strong id="ddm_03_0031__b16562132813210">"aab,,,bba,ddd"</strong></p>
|
||||||
|
<p id="ddm_03_0031__p38841126172217">If a data field contains quotation marks, the preceding method may not work. You can add a backslash (\) before each quotation mark (") in the field, for example, <strong id="ddm_03_0031__b888517247292">"aab,,,bba,ddd\"ddd\"bb,ae"</strong>.</p>
|
||||||
|
</div></div>
|
||||||
|
<ul id="ddm_03_0031__en-us_topic_0077295700_ul2811566712"><li class="msonormal" id="ddm_03_0031__en-us_topic_0077295700_li15814566718">If keyword <strong id="ddm_03_0031__b32228112816">LOCAL</strong> is specified, the file is read from the client host. If keyword <strong id="ddm_03_0031__b15925147112816">LOCAL</strong> is not specified, this function is not supported for security purposes.</li><li class="msonormal" id="ddm_03_0031__l6eb09b48b55d463e87c0696d622c89a7">You can use <strong id="ddm_03_0031__b34841612142815">FIELDS TERMINATED BY</strong> to specify a separator between characters. The default value is <strong id="ddm_03_0031__b16486131292811">\t</strong>.</li><li id="ddm_03_0031__l73dca3d4e8f246e8916b8fcde0bcfd88">You can use <strong id="ddm_03_0031__b945614214286">OPTIONALLY ENCLOSED BY</strong> to ignore symbols in the data source fields.</li><li class="msonormal" id="ddm_03_0031__l5ecb5831a0144542afca7c44b472d3e2">You can use <strong id="ddm_03_0031__b432854520285">LINES TERMINATED BY</strong> to specify a newline character between lines. The default value is <strong id="ddm_03_0031__b193308456280">\n</strong>.<div class="note" id="ddm_03_0031__en-us_topic_0077295700_note395042155"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_03_0031__en-us_topic_0077295700_p095015212510">On some hosts running the Windows OS, the newline character of text files may be <strong id="ddm_03_0031__b69487515285">\r\n</strong>. The newline character is invisible, so you may need to check whether it is there.</p>
|
||||||
|
</div></div>
|
||||||
|
</li><li class="msonormal" id="ddm_03_0031__en-us_topic_0077295700_li11431562818">You can use <strong id="ddm_03_0031__b135039952915">CHARACTER SET</strong> to specify a file code that should be the same as the code used by physical databases in the target RDS for MySQL instance, to avoid garbled characters. The character set code shall be enclosed in quotation marks to avoid parsing errors.</li><li class="msonormal" id="ddm_03_0031__en-us_topic_0077295700_li35111337916">You can use <strong id="ddm_03_0031__b117731615132916">IGNORE</strong> or <strong id="ddm_03_0031__b37743153297">REPLACE</strong> to specify whether repeated records are replaced or ignored.</li><li class="msonormal" id="ddm_03_0031__le5837d93053e408e8c4529ff7460e3e5">Currently, the column name must be specified, and the sharding field must be included. Otherwise, the route cannot be determined.</li><li class="msonormal" id="ddm_03_0031__laa798c13cc5a47f39a7b03d16eadc420">For other parameters, see the <a href="https://dev.mysql.com/doc/refman/8.0/en/load-data.html" target="_blank" rel="noopener noreferrer">LOAD DATA INFILE Syntax</a> on the MySQL official website. The sequence of other parameters must be correct. For more information, visit <a href="https://dev.mysql.com/doc/refman/8.0/en/load-data.html" target="_blank" rel="noopener noreferrer">the MySQL official website</a>.</li></ul>
|
||||||
|
<div class="notice" id="ddm_03_0031__ne238ab28d22d4ee98ec372aebae5e9cf"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ol id="ddm_03_0031__o745f275d83f64e4e8db6b71d5815604c"><li id="ddm_03_0031__l3187145fdc8e4af895caf5bfc1b10c3b">Importing data affects performance of DDM instances and RDS for MySQL instances. Import data during off-peak hours.</li><li id="ddm_03_0031__en-us_topic_0077295700_li16699711229">Do not to send multiple LOAD DATA requests at the same time. If you do so, SQL transactions may time out due to highly concurrent data write operations, table locking, and system I/O occupation, resulting in failure of all LOAD DATA requests.</li><li id="ddm_03_0031__l5be15aa820fc4956896adfa6ac27c4d1">Manually submit transactions when using LOAD DATA to import data so that data records are modified correctly.<p id="ddm_03_0031__en-us_topic_0077295700_p29870133917"><a name="ddm_03_0031__l5be15aa820fc4956896adfa6ac27c4d1"></a><a name="l5be15aa820fc4956896adfa6ac27c4d1"></a>For example, configure your client as follows:</p>
|
||||||
|
<p id="ddm_03_0031__a3042407f1ee549b38fc47ca4cfb2f6fb"><strong id="ddm_03_0031__abf5f93116cd748498568a825971da0f4">mysql> set autocommit=0; </strong><em id="ddm_03_0031__aaeeee4ed04ff4c279a4a1d46c3a064f4"></em></p>
|
||||||
|
<p id="ddm_03_0031__p1477615194534"><strong id="ddm_03_0031__b15775319205318">mysql> </strong><strong id="ddm_03_0031__b2083018553538">LOAD DATA LOCAL INFILE</strong> '/data/data.txt' <strong id="ddm_03_0031__b6314219545">IGNORE INTO TABLE</strong> <strong id="ddm_03_0031__b117941525419">test CHARACTER SET</strong> <strong id="ddm_03_0031__b53151244205412">'utf8' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' (id, sid, asf);</strong></p>
|
||||||
|
<p id="ddm_03_0031__en-us_topic_0077295700_p46101925395"><strong id="ddm_03_0031__ad1a8e7dbb6d445e7b2f68ad620cae15c">mysql> commit;</strong></p>
|
||||||
|
</li></ol>
|
||||||
|
</div></div>
|
||||||
|
<div class="section" id="ddm_03_0031__s3d5ff5d75d634f4f922235e072427269"><h4 class="sectiontitle">Use Constraints</h4><p id="ddm_03_0031__p198410167175">There are the following constraints on LOAD DATA syntax.</p>
|
||||||
|
<ul id="ddm_03_0031__u503e8adfa28a48f191bb99a25ad94579"><li id="ddm_03_0031__li7615184019393">LOW_PRIORITY is not supported.</li><li id="ddm_03_0031__li6737195583919">CONCURRENT is not supported.</li><li id="ddm_03_0031__li97314104012">PARTITION (partition_name [, partition_name] ...) is not supported.</li><li id="ddm_03_0031__li8540151215447">LINES STARTING BY 'string' is not supported.</li><li id="ddm_03_0031__li761442174417">User-defined variables are not supported.</li><li id="ddm_03_0031__li443884114515">ESCAPED BY supports only '\\'.</li><li id="ddm_03_0031__li1546101424520">If you have not specified a value for your auto-increment key when you insert a data record, DDM will not fill a value for the key. The auto-increment keys of data nodes of a DDM instance all take effect, so the auto-increment key values may be duplicate.</li><li id="ddm_03_0031__li152397175459">If the primary key or unique index is not routed to the same physical table, REPLACE does not take effect.</li><li id="ddm_03_0031__li19357203119455">If the primary key or unique index is not routed to the same physical table, IGNORE does not take effect.</li></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
34
docs/ddm/umn/ddm_03_0032.html
Normal file
34
docs/ddm/umn/ddm_03_0032.html
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<a name="ddm_03_0032"></a><a name="ddm_03_0032"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Database Management Syntax</h1>
|
||||||
|
<div id="body1597045080514"><div class="section" id="ddm_03_0032__section05765572371"><h4 class="sectiontitle">Supported Database Management Syntax</h4><ul id="ddm_03_0032__u77526ec2b3244cecbeffeeeed8a6c028"><li class="msonormal" id="ddm_03_0032__ld79cc39ecdc940c4ace43e8a1b5a2b60">SHOW Syntax</li><li class="msonormal" id="ddm_03_0032__en-us_topic_0077295701_li44631852311">SHOW COLUMNS Syntax</li><li class="msonormal" id="ddm_03_0032__en-us_topic_0077295701_li39806510317">SHOW CREATE TABLE Syntax</li><li class="msonormal" id="ddm_03_0032__l535b5420a93f4e9fa73211de2b9a7c26">SHOW TABLE STATUS Syntax</li><li class="msonormal" id="ddm_03_0032__l9bcbd64b9c734f388196cacadfa22d78">SHOW TABLES Syntax</li><li class="msonormal" id="ddm_03_0032__l69992b8295f843569ec6483ac7d3523f">SHOW DATABASES<p id="ddm_03_0032__p104411019142914"><a name="ddm_03_0032__l69992b8295f843569ec6483ac7d3523f"></a><a name="l69992b8295f843569ec6483ac7d3523f"></a>If the required database is not found, check fine-grained permissions of your account.</p>
|
||||||
|
</li><li class="msonormal" id="ddm_03_0032__en-us_topic_0077295701_li23647813115">SHOW INDEX FROM</li><li id="ddm_03_0032__en-us_topic_0077295701_li29918893116">SHOW VARIABLES Syntax</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_03_0032__s04edb61a6abc45a98c3aecbf7f8da1f6"><h4 class="sectiontitle">Supported Database Tool Commands</h4><ul id="ddm_03_0032__en-us_topic_0077295701_ul19541437472"><li class="msonormal" id="ddm_03_0032__lb0c0e05a70124d99854f98b24f5f99d3">DESC Syntax</li><li id="ddm_03_0032__le8c6ff613f7d4c7780765d3c796305a1">USE Syntax</li><li id="ddm_03_0032__lfd559ab3186d4d63b96003a6c5cc5df5">EXPLAIN Syntax<p class="msonormal" id="ddm_03_0032__en-us_topic_0077295701_p56414369"><a name="ddm_03_0032__lfd559ab3186d4d63b96003a6c5cc5df5"></a><a name="lfd559ab3186d4d63b96003a6c5cc5df5"></a>Unlike EXPLAIN in MySQL, the output of DDM EXPLAIN describes the nodes that the current SQL statement is routed to.</p>
|
||||||
|
</li></ul>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="ddm_03_0032__s9cccb74e821844888011da6d154da8d4"><h4 class="sectiontitle">Unsupported Database Management Syntax</h4>
|
||||||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ddm_03_0032__table71216581815" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Restrictions on database management statements</caption><thead align="left"><tr id="ddm_03_0032__en-us_topic_0169506650_row1359552215619"><th align="left" class="cellrowborder" valign="top" width="18.91%" id="mcps1.3.3.2.2.3.1.1"><p id="ddm_03_0032__en-us_topic_0169506650_p7595112215618"><strong id="ddm_03_0032__b984019219310">Item</strong></p>
|
||||||
|
</th>
|
||||||
|
<th align="left" class="cellrowborder" valign="top" width="81.08999999999999%" id="mcps1.3.3.2.2.3.1.2"><p id="ddm_03_0032__en-us_topic_0169506650_p16595132205617"><strong id="ddm_03_0032__b7878820313">Restriction</strong></p>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr id="ddm_03_0032__en-us_topic_0169506650_row1059552214563"><td class="cellrowborder" valign="top" width="18.91%" headers="mcps1.3.3.2.2.3.1.1 "><p id="ddm_03_0032__en-us_topic_0169506650_p159642210560">Database management statements</p>
|
||||||
|
</td>
|
||||||
|
<td class="cellrowborder" valign="top" width="81.08999999999999%" headers="mcps1.3.3.2.2.3.1.2 "><ul id="ddm_03_0032__en-us_topic_0169506650_u6486dcb468cb43ae91255d0c62dba963"><li class="msonormal" id="ddm_03_0032__en-us_topic_0169506650_l27f08f34069a4836b6ce7f73e2ffd4bb">Executing SET Syntax to modify global variables is not supported.</li><li id="ddm_03_0032__en-us_topic_0169506650_l20b2edb891cc4b258ed79eb42e72d3a3">SHOW TRIGGERS is not supported.</li></ul>
|
||||||
|
<p id="ddm_03_0032__en-us_topic_0169506650_en-us_topic_0077295701_p62625051">The following SHOW statements are randomly sent to a database shard. If database shards are on different RDS for MySQL instances, the returned variables or table information may be different.</p>
|
||||||
|
<ul id="ddm_03_0032__en-us_topic_0169506650_en-us_topic_0077295701_ul7281275257"><li class="msonormal" id="ddm_03_0032__en-us_topic_0169506650_l9d1da428a09748e28da500181424915f">SHOW TABLE STATUS</li><li id="ddm_03_0032__en-us_topic_0169506650_lf541508578114dacb22ef0662ae24a20">SHOW VARIABLES Syntax</li><li id="ddm_03_0032__li765691273513">CHECK TABLE does not support sharding tables by hash or sharding key.</li><li id="ddm_03_0032__li188111423142713">SHOW WARNINGS Syntax does not support the combination of LIMIT and COUNT.</li><li id="ddm_03_0032__li817481517275">SHOW ERRORS Syntax does not support the combination of LIMIT and COUNT.</li></ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0001.html">SQL Syntax</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
20
docs/ddm/umn/ddm_03_0034.html
Normal file
20
docs/ddm/umn/ddm_03_0034.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<a name="ddm_03_0034"></a><a name="ddm_03_0034"></a>
|
||||||
|
|
||||||
|
<h1 class="topictitle1">Customized Hints for Read/Write Splitting</h1>
|
||||||
|
<div id="body1597045080515"><p id="ddm_03_0034__p662245454213">DDM allows you to customize a hint to specify whether SQL statements are executed on the primary instance or its read replicas.</p>
|
||||||
|
<p id="ddm_03_0034__p2193156183516">The following hint formats are supported:</p>
|
||||||
|
<p id="ddm_03_0034__p203772122306">Format 1</p>
|
||||||
|
<pre class="codeblock" id="ddm_03_0034__codeblock9304104813012">/*!mycat:db_type=<strong id="ddm_03_0034__b730654823012">hos</strong>t*/</pre>
|
||||||
|
<p id="ddm_03_0034__p16189123113011">Format 2</p>
|
||||||
|
<pre class="codeblock" id="ddm_03_0034__codeblock1158195419301">/*+ db_type=<strong id="ddm_03_0034__b18581954123019">host</strong> */</pre>
|
||||||
|
<p id="ddm_03_0034__p117631811102314"><strong id="ddm_03_0034__b842352706171941">host</strong> can be <strong id="ddm_03_0034__b28701374572">master</strong> or <strong id="ddm_03_0034__b1115044065716">slave</strong>. <strong id="ddm_03_0034__b1443215224573">master</strong> indicates a primary instance, and <strong id="ddm_03_0034__b11462190175817">slave</strong> indicates a read replica.</p>
|
||||||
|
<div class="p" id="ddm_03_0034__p362395414210">Currently, this function only applies to SELECT statements.<div class="note" id="ddm_03_0034__en-us_topic_0077295700_note395042155"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ddm_03_0034__en-us_topic_0077295700_p095015212510">After read/write splitting is enabled, write operations are performed only on the primary instance, and read operations are performed only on its read replicas. To read from the primary instance, you can customize a hint to forcibly perform read operations on the primary instance. This method is only suitable for queries.</p>
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="familylinks">
|
||||||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ddm-08-0002.html">Supported SQL Statements</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user