亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

select count(*) from v$lock 查詢慢

發布時間:2020-07-15 01:59:31 來源:網絡 閱讀:1042 作者:roidba 欄目:關系型數據庫

描述:
select count(*) from v$lock 查詢慢 解決方法,具體原因看官方優化文檔哈

SQL> set time on 
00:51:52 SQL> select count(*) from v$lock;

  COUNT(*)
----------
        35
--需要十幾秒才能返回結果。

00:55:10 SQL> select /*+ rule */ count(*) from v$lock;

  COUNT(*)
----------
        35

00:55:38 SQL> 

方法1:
添加hint
方法2:
收集統計信息

MOS參考文檔
Query Against v$lock Run from OEM Performs Slowly (文檔 ID 1328789.1)

搜集統計信息方法如下:
13.2.5?Gathering Statistics for Fixed Objects
Fixed objects are dynamic performance tables and their indexes. These objects record current database activity.
Unlike other database tables, the database does not automatically use dynamic statistics for SQL statement referencing?X$?tables when optimizer statistics are missing. Instead, the optimizer uses predefined default values. These defaults may not be representative and could potentially lead to a suboptimal execution plan. Thus, it is important to keep fixed object statistics current.
Oracle Database automatically gathers fixed object statistics as part of automated statistics gathering if they have not been previously collected. You can also manually collect statistics on fixed objects by calling?DBMS_STATS.GATHER_FIXED_OBJECTS_STATS. Oracle recommends that you gather statistics when the database has representative activity.

Prerequisites
You must have the?SYSDBA?or?ANALYZE ANY DICTIONARY?system privilege to execute this procedure.

To gather schema statistics using GATHER_FIXED_OBJECTS_STATS:
In SQL*Plus or SQL Developer, log in to the database as a user with the necessary privileges.

Example 13-2 Gathering Statistics for a Table
This example uses the?DBMS_STATS?package to gather fixed object statistics.

BEGIN
  DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;
END;
/

See Also:
"Configuring Automatic Optimizer Statistics Collection"
Oracle Database PL/SQL Packages and Types Reference?to learn about the?GATHER_TABLE_STATS?procedure
Parent topic:?Gathering Optimizer Statistics Manually
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

偏关县| 东丽区| 蓬安县| 壶关县| 赣榆县| 兰西县| 吉林省| 罗城| 湟中县| 汝城县| 石城县| 普格县| 巩义市| 桃园市| 大姚县| 闻喜县| 栖霞市| 高雄市| 武平县| 丁青县| 五大连池市| 米林县| 无为县| 宁都县| 桑植县| 百色市| 蓝山县| 余干县| 祁门县| 白城市| 蓬莱市| 莱阳市| 阿勒泰市| 白沙| 五河县| 景谷| 安宁市| 镇平县| 平和县| 乐东| 高密市|