forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
15 lines
3.8 KiB
HTML
15 lines
3.8 KiB
HTML
<a name="EN-US_TOPIC_0000001188642054"></a><a name="EN-US_TOPIC_0000001188642054"></a>
|
||
|
||
<h1 class="topictitle1">PGXC_SQL_COUNT</h1>
|
||
<div id="body1530499427337"><p id="EN-US_TOPIC_0000001188642054__p14638154012268"><strong id="EN-US_TOPIC_0000001188642054__b1498965384910">PGXC_SQL_COUNT</strong> displays the node-level and user-level statistics for the SQL statements of <strong id="EN-US_TOPIC_0000001188642054__b137411322155111">SELECT</strong>, <strong id="EN-US_TOPIC_0000001188642054__b1797620232518">INSERT</strong>, <strong id="EN-US_TOPIC_0000001188642054__b107267282519">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001188642054__b17428173145117">DELETE</strong>, and <strong id="EN-US_TOPIC_0000001188642054__b818970142318">MERGE INTO</strong> and DDL, DML, and DCL statements of each CN in a cluster in real time, identifies query types with heavy load, and measures the capability of a cluster or a node to perform a specific type of query. You can calculate QPS based on the quantities and response time of the preceding types of SQL statements at certain time points. For example, <strong id="EN-US_TOPIC_0000001188642054__b7142173710354">USER1 SELECT</strong> is counted as <strong id="EN-US_TOPIC_0000001188642054__b16143173703520">X1</strong> at T1 and as <strong id="EN-US_TOPIC_0000001188642054__b71431337193511">X2</strong> at T2. The <strong id="EN-US_TOPIC_0000001188642054__b314416376352">SELECT</strong> QPS of the user can be calculated as follows: (X2 – X1)/(T2 – T1). In this way, the system can draw cluster-user-level QPS curve graphs and determine cluster throughput, monitoring changes in the service load of each user. If there are drastic changes, the system can locate the specific statement type (such as <strong id="EN-US_TOPIC_0000001188642054__b10522103611347">SELECT</strong>, <strong id="EN-US_TOPIC_0000001188642054__b189983817341">INSERT</strong>, <strong id="EN-US_TOPIC_0000001188642054__b13225539123415">UPDATE</strong>, <strong id="EN-US_TOPIC_0000001188642054__b03191740123411">DELETE</strong>, and <strong id="EN-US_TOPIC_0000001188642054__b968562191619">MERGE INTO</strong>). You can also observe QPS curves to determine the time points when problems occur and then locate the problems using other tools. The curves provide a basis for optimizing cluster performance and locating problems.</p>
|
||
<p id="EN-US_TOPIC_0000001188642054__p1719518297184">Columns in the <strong id="EN-US_TOPIC_0000001188642054__b16186131217168">PGXC_SQL_COUNT</strong> view are the same as those in the <strong id="EN-US_TOPIC_0000001188642054__b6295244160">GS_SQL_COUNT</strong> view. For details, see <a href="dws_04_0695.html#EN-US_TOPIC_0000001188482268__t8f0334486f934453827d563b90c86711">Table 1</a>.</p>
|
||
<div class="note" id="EN-US_TOPIC_0000001188642054__na909128a9b354a7781d484c708ff5227"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001188642054__a9d4f06e8cba641bbbe8861ce81dfaab7">If a <strong id="EN-US_TOPIC_0000001188642054__b23084266519">MERGE INTO</strong> statement can be pushed down and a DN receives it, the statement will be counted on the DN and the value of the <strong id="EN-US_TOPIC_0000001188642054__b19711640750">mergeinto_count</strong> column will increment by 1. If the pushdown is not allowed, the DN will receive an <strong id="EN-US_TOPIC_0000001188642054__b199551531852">UPDATE</strong> or <strong id="EN-US_TOPIC_0000001188642054__b1034155718510">INSERT</strong> statement. In this case, the <strong id="EN-US_TOPIC_0000001188642054__b23771410966">update_count</strong> or <strong id="EN-US_TOPIC_0000001188642054__b17269151314610">insert_count</strong> column will increment by 1.</p>
|
||
</div></div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_04_0639.html">System Views</a></div>
|
||
</div>
|
||
</div>
|
||
|