- 最后登录
- 2014-9-4
- 在线时间
- 60 小时
- 威望
- 87
- 金钱
- 552
- 注册时间
- 2011-10-12
- 阅读权限
- 50
- 帖子
- 35
- 精华
- 1
- 积分
- 87
- UID
- 16
|
1#
发表于 2012-3-27 10:44:16
|
查看: 4198 |
回复: 2
SQL
-
- select count(*)
- from ds_wallcontent_base a,
- ds_wallcontent_info b,
- ds_user_info c,
- post_xy_ext d,
- post_xy_info e,
- xy_theme_info f,
- XY_SCHOOL_INFO g
- where a.baseid = b.baseid
- and a.userid = c.userid
- and a.baseid = d.postid
- and e.schoolid = g.SCHOOLID
- and d.id = e.id
- and e.themeid = f.themeid
- and a.status = '1'
- and b.status = '1'
- and c.is_valid = '0'
- and e.is_valid = '1'
- and f.themeid = '-1'
- or '3' = '3'
复制代码
执行计划
- PLAN_TABLE_OUTPUT
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- Plan hash value: 2415169629
- --------------------------------------------------------------------------------------------------
- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
- --------------------------------------------------------------------------------------------------
- | 0 | SELECT STATEMENT | | 1 | 61 | 18E (0)|999:59:59 |
- | 1 | SORT AGGREGATE | | 1 | 61 | | |
- | 2 | MERGE JOIN CARTESIAN | | 18E| 15E| 18E (0)|999:59:59 |
- | 3 | MERGE JOIN CARTESIAN | | 18E| 15E| 18E (0)|999:59:59 |
- | 4 | MERGE JOIN CARTESIAN | | 18E| 15E| 224P (1)|999:59:59 |
- | 5 | MERGE JOIN CARTESIAN | | 2750T| 83P| 5139G (2)|999:59:59 |
- PLAN_TABLE_OUTPUT
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- | 6 | MERGE JOIN CARTESIAN | | 95G| 1685G| 241M (2)|803:27:53 |
- | 7 | MERGE JOIN CARTESIAN| | 332K| 3567K| 3479 (1)| 00:00:42 |
- | 8 | INDEX FULL SCAN | PK_XY_THEME_INFO | 7 | 21 | 1 (0)| 00:00:01 |
- | 9 | BUFFER SORT | | 47445 | 370K| 3478 (1)| 00:00:42 |
- | 10 | TABLE ACCESS FULL | DS_WALLCONTENT_INFO | 47445 | 370K| 497 (1)| 00:00:06 |
- | 11 | BUFFER SORT | | 286K| 2240K| 241M (2)|803:27:47 |
- | 12 | TABLE ACCESS FULL | DS_USER_INFO | 286K| 2240K| 726 (2)| 00:00:09 |
- | 13 | BUFFER SORT | | 28877 | 423K| 5139G (2)|999:59:59 |
- | 14 | TABLE ACCESS FULL | POST_XY_INFO | 28877 | 423K| 54 (2)| 00:00:01 |
- | 15 | BUFFER SORT | | 49347 | 674K| 224P (1)|999:59:59 |
- | 16 | TABLE ACCESS FULL | DS_WALLCONTENT_BASE | 49347 | 674K| 82 (2)| 00:00:01 |
- PLAN_TABLE_OUTPUT
- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- | 17 | BUFFER SORT | | 3091 | 12364 | 18E (0)|999:59:59 |
- | 18 | INDEX FAST FULL SCAN | PK_XY_SCHOOL_INFO | 3091 | 12364 | 2 (0)| 00:00:01 |
- | 19 | BUFFER SORT | | 29429 | 258K| 18E (0)|999:59:59 |
- | 20 | TABLE ACCESS FULL | POST_XY_EXT | 29429 | 258K| 15 (7)| 00:00:01 |
- --------------------------------------------------------------------------------------------------
- 27 rows selected.
- Execution Plan
- ----------------------------------------------------------
- Plan hash value: 2137789089
- ---------------------------------------------------------------------------------------------
- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
- ---------------------------------------------------------------------------------------------
- | 0 | SELECT STATEMENT | | 8168 | 16336 | 24 (0)| 00:00:01 |
- | 1 | COLLECTION ITERATOR PICKLER FETCH| DISPLAY | | | | |
- ---------------------------------------------------------------------------------------------
- Statistics
- ----------------------------------------------------------
- 729 recursive calls
- 26 db block gets
- 992 consistent gets
- 0 physical reads
- 0 redo size
- 3344 bytes sent via SQL*Net to client
- 503 bytes received via SQL*Net from client
- 3 SQL*Net roundtrips to/from client
- 27 sorts (memory)
- 0 sorts (disk)
- 27 rows processed
复制代码
各表的数据行数
- ds_wallcontent_info 47694
- ds_wallcontent_base 49598
- ds_user_info 287128
- post_xy_ext 29240
- post_xy_info 29240
- xy_theme_info 7
- XY_SCHOOL_INFO 3091
复制代码 |
|