doc-exports/docs/dws/dev/dws_04_0847.html
Lu, Huayi a24ca60074 DWS DEVELOPER 811 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-01-19 13:37:49 +00:00

103 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001145894451"></a><a name="EN-US_TOPIC_0000001145894451"></a>
<h1 class="topictitle1">PLAN_TABLE_DATA</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001145894451__a2ae17fbd1b5d4d839247ca4ff50cac59"><strong id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_b4633141255">PLAN_TABLE_DATA</strong> displays the plan information collected by <strong id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_b26353452510">EXPLAIN PLAN</strong>. Different from the <strong id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_b14812133317258">PLAN_TABLE</strong> view, the system catalog <strong id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_b3386174714251">PLAN_TABLE_DATA</strong> stores the plan information collected by all sessions and users.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001145894451__tf625d8fe4e5d4d0bb97182d881cb1afa" frame="border" border="1" rules="all"><caption><b>Table 1 </b>PLAN_TABLE columns</caption><thead align="left"><tr id="EN-US_TOPIC_0000001145894451__re18463b67cbc47a2baffc69ed201fa60"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001145894451__a373bd67fc0734f84824d8a74fd5f054b">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001145894451__aef25b42d579b4c8da5ce5b9113740112">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001145894451__a14781199b0714c068b4d3a396ad7d0b1">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001145894451__r66a2115686d54dc9a0287b8e00db0db2"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__a03e7c0b6e9964558bbdd082f6ba94017">session_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p929616441417">text</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__a6cc2678f576c4aa9a6562bc70fab71a7">Session that inserts the data. Its value consists of a service thread start timestamp and a service thread ID. Values are constrained by <strong id="EN-US_TOPIC_0000001145894451__b39311762296">NOT NULL</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r1a9c8445c1354b51b6b1180a77ed1c21"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__a241c64181f8a4b66b951dd8de17ccd96">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p192806441143">oid</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__p8441981369">User who inserts the data. Values are constrained by <strong id="EN-US_TOPIC_0000001145894451__b2540164073616">NOT NULL</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r0ce04e9cfdff46e0b3de34756b74e136"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__a61b64b9ea1ce4abbadb1eb616b897f4f">statement_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a2899d440692c47b2b56da442db5dc596">varchar2(30)</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__a025db2acb95d4bc6a1d780d5f6e499e5">Query tag specified by a user</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__rd8ec1ff3d46b4e5c8bdfe9d7162e72ad"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__ae46a92e3c9f5449e9f341b53898dfd85">plan_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a35f05b48bbd446a2927213ea2db621ab">bigint</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__ab4edb4e055ea416d8b03f0d0a68573c6">ID of a plan to be queried</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r2ede5f328b984e7a9bf93efeb46540b4"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__ace838c333b264e9fb838373e3279b7df">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__ac29ebf0b9c0f407cb9ad533b917db328">int</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__ab9fd13bd8b3a4b92b5649973577739eb">Node ID in a plan</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__rca73ad24ec3e404eaa3e502ebb494427"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__ae653e11395df4001a82ede0130b91289">operation</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a204dd05d1175433289427f6f0425756c">varchar2(30)</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__ae51e81e0661d4cbf8959fce8b2479e64">Operation description</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__rd6bab234ea4442c2b006b154dbadcbb3"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p46189573117">options</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a587fbadcbe1f4468bbef26a2a1e50702">varchar2(255)</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__a80f091ac67954bc0936c12f303978efe">Operation parameters</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r30984fa89c1046128897059b5636216e"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p561875761112">object_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a82bdc011bcde43d391f75eef3caa0a57">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p361913573118">Name of an operated object. It is defined by users.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r8f85155e7b6f4ccca93f7c2a4976a33a"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__aa17613c696c547b7b7ba558f17f7382d">object_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p648441711132">varchar2(30)</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p56197578112">Object type</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__r1fe5ff785d064013a525f07f9fbbe338"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__ad1cf02f8a16347638dbed1cf2e08091e">object_owner</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p261955741117">name</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__abd0765cf573d4a2681765b2e089669ee">User-defined schema to which an object belongs</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001145894451__rcdb21e7041ed4ba988e739010bf645b6"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p111633243217">projection</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001145894451__a0c9c5dee91a04ff790aacd171872529d">varchar2(4000)</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_p121639223213">Returned column information</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001145894451__naf475125f5b54038a9c9d5a5016c710a"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001145894451__u21f5bae6157b4bf6ab2bc0ca0803a059"><li id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_li86021151012"><strong id="EN-US_TOPIC_0000001145894451__b1527117454365">PLAN_TABLE_DATA</strong> records data of all users and sessions on the current node. Only administrators can access all the data. Common users can view only their own data in the <a href="dws_04_0846.html">PLAN_TABLE</a> view.</li><li id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_li11417471112">Data of inactive (exited) sessions is cleaned from <strong id="EN-US_TOPIC_0000001145894451__b12713169175511">PLAN_TABLE_DATA</strong> by <strong id="EN-US_TOPIC_0000001145894451__b2726159175517">gs_clean</strong> after being stored in this system catalog for a certain period of time (5 minutes by default). You can also manually run <strong id="EN-US_TOPIC_0000001145894451__b186813271583">gs_clean -C</strong> to delete inactive session data from the table..</li><li id="EN-US_TOPIC_0000001145894451__en-us_topic_0166116567_li16959981815">Data is automatically inserted into <strong id="EN-US_TOPIC_0000001145894451__b109441142115618">PLAN_TABLE_DATA</strong> after <strong id="EN-US_TOPIC_0000001145894451__b49451742155616">EXPLAIN PLAN</strong> is executed. Therefore, do not manually insert data into or update data in <strong id="EN-US_TOPIC_0000001145894451__b694517424561">PLAN_TABLE_DATA</strong>. Otherwise, data in <strong id="EN-US_TOPIC_0000001145894451__b694694255620">PLAN_TABLE_DATA</strong> may be disordered. To delete data from <strong id="EN-US_TOPIC_0000001145894451__b39959201406">PLAN_TABLE_DATA</strong>, you are advised to use the <a href="dws_04_0846.html">PLAN_TABLE</a> view.</li><li id="EN-US_TOPIC_0000001145894451__ld8bf530cb8244c3e87afda5ccff9d44d">Information in the <strong id="EN-US_TOPIC_0000001145894451__b1943612494579">statement_id</strong>, <strong id="EN-US_TOPIC_0000001145894451__b124372494575">object_name</strong>, <strong id="EN-US_TOPIC_0000001145894451__b3437184975715">object_owner</strong>, and <strong id="EN-US_TOPIC_0000001145894451__b2438184985716">projection</strong> columns is stored in letter cases specified by users and information in other columns is stored in uppercase.</li></ul>
</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>