1.old sql:
德化ssl適用于網(wǎng)站、小程序/APP、API接口等需要進行數(shù)據(jù)傳輸應用場景,ssl證書未來市場廣闊!成為創(chuàng)新互聯(lián)公司的ssl證書銷售渠道,可以享受市場價格4-6折優(yōu)惠!如果有意向歡迎電話聯(lián)系或者加微信:18980820575(備注:SSL證書合作)期待與您的合作!SELECT a.object_id, a.object_name, b.max_id, b.min_id FROM HH a, ( SELECT owner, MAX (object_id) AS max_id, MIN (object_id) AS min_id FROM HH GROUP BY owner) b WHERE a.last_ddl_time BETWEEN TO_DATE ('2010-01-01', 'yyyy-mm-dd') AND TO_DATE ('2012-01-01', 'yyyy-mm-dd') AND a.owner IN ('MESDEV', 'RPTDEV') and a.owner=b.owner;
Elapsed: 00:00:25.50 Execution Plan ---------------------------------------------------------- ----------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ----------------------------------------------------------------- | 0 | SELECT STATEMENT | | 2 | 254 | 433 (2)| | 1 | HASH GROUP BY | | 2 | 254 | 433 (2)| | 2 | HASH JOIN | | 2 | 254 | 432 (1)| | 3 | TABLE ACCESS FULL| HH | 2 | 194 | 216 (1)| | 4 | TABLE ACCESS FULL| HH | 661 | 19830 | 216 (1)| ----------------------------------------------------------------- Note ----- - 'PLAN_TABLE' is old version Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 1904 consistent gets 0 physical reads 0 redo size 111609 bytes sent via SQL*Net to client 2670 bytes received via SQL*Net from client 200 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 2977 rows processed
2.new sql
SELECT a.object_id, a.object_name, a.max_id, a.min_id FROM (SELECT object_id, object_name, last_ddl_time, MAX (object_id) OVER (PARTITION BY owner) AS max_id, MIN (object_id) OVER (PARTITION BY owner) AS min_id FROM HH WHERE owner IN ('MESDEV', 'RPTDEV')) a WHERE a.last_ddl_time BETWEEN TO_DATE ('2010-01-01', 'yyyy-mm-dd') AND TO_DATE ('2012-01-01', 'yyyy-mm-dd');
Elapsed: 00:00:00.09 Execution Plan ---------------------------------------------------------- ----------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| ----------------------------------------------------------------- | 0 | SELECT STATEMENT | | 661 | 75354 | 217 (2)| | 1 | VIEW | | 661 | 75354 | 217 (2)| | 2 | WINDOW SORT | | 661 | 64117 | 217 (2)| | 3 | TABLE ACCESS FULL| HH | 661 | 64117 | 216 (1)| ----------------------------------------------------------------- Note ----- - 'PLAN_TABLE' is old version Statistics ---------------------------------------------------------- 1 recursive calls 0 db block gets 952 consistent gets 0 physical reads 0 redo size 108149 bytes sent via SQL*Net to client 2670 bytes received via SQL*Net from client 200 SQL*Net roundtrips to/from client 1 sorts (memory) 0 sorts (disk) 2977 rows processed
當前文章:分析函數(shù)改寫SQL-創(chuàng)新互聯(lián)
網(wǎng)站地址:http://jinyejixie.com/article24/ccpjje.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供微信公眾號、App設計、網(wǎng)站導航、響應式網(wǎng)站、云服務器、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容