扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:赛迪网 韩劲草 来源:天新网 2008年3月22日
关键字: 数据库 Mssql SQL SQL Server
在本页阅读全文(共4页)
已用时间: 00: 00: 01.03
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 NESTED LOOPS
2 1 VIEW
3 2 SORT (UNIQUE)
4 3 UNION-ALL
5 4 SORT (GROUP BY)
6 5 TABLE Access (FULL) OF "CJ601"
7 4 SORT (GROUP BY)
8 7 TABLE ACCESS (FULL) OF "CJ601"
9 4 SORT (GROUP BY)
10 9 TABLE ACCESS (FULL) OF "CJ601"
11 1 TABLE ACCESS (BY INDEX ROWID) OF "DJZCLX"
12 11 INDEX (UNIQUE SCAN) OF "SYS_C002814" (UNIQUE)
Statistics
----------------------------------------------------------
199 recursive calls
0 db block gets
13854 consistent gets
2086 physical reads
0 redo size
1480 bytes sent via SQL*Net to client
514 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
8 sorts (memory)
0 sorts (disk)
28 rows processed
SQL> select code 代码 , substrb(" ",1,item_level*2-2)||b.reg_type 登记注册类型, cnt 家数 from
2 (
3 select
4 case when code3 is not null then code3
5 when code2<>"0" then code2
6 else code1
7 end code,cnt
8 from (
9 select substr(z01_08,1,1)||"00" code1 , substr(z01_08,1,2)||"0" code2 , substr(z01_08,1,3) code3 ,count(*) cnt
10 from cj601
11 group by rollup(substr(z01_08,1,1),substr(z01_08,1,2),substr(z01_08,1,3))
12 ) where code2<>code3 or code3 is null and code1<>"00"
13 )
14 c, djzclx b where c.code=b.reg_code
15 order by 1
16 ;
已选择28行。
已用时间: 00: 00: 00.07
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 SORT (ORDER BY)
2 1 NESTED LOOPS
3 2 VIEW
4 3 FILTER
5 4 SORT (GROUP BY ROLLUP)
6 5 TABLE ACCESS (FULL) OF "CJ601"
7 2 TABLE ACCESS (BY INDEX ROWID) OF "DJZCLX"
8 7 INDEX (UNIQUE SCAN) OF "SYS_C002814" (UNIQUE)
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者