1 create index fidx__to_char_ARTICLE_ID on ARTICLE(TO_CHAR(id));
执行计划改变了:
01 -------------------------------------------------------------------------------------------------
02 | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
03 -------------------------------------------------------------------------------------------------
04 | 0 | SELECT STATEMENT | | 30 | 38790 | 1561 (1)|
05 | 1 | COUNT STOPKEY | | | | |
06 | 2 | VIEW | | 76140 | 93M| 1561 (1)|
07 | 3 | SORT ORDER BY STOPKEY | | 76140 | 10M| 1561 (1)|
08 | 4 | NESTED LOOPS | | 76140 | 10M| 1561 (1)|
09 | 5 | TABLE ACCESS BY INDEX ROWID| RESOURCES | 126 | 7560 | 48 (0)|
10 | 6 | INDEX RANGE SCAN | IDX_RESOURCES | 126 | | 1 (0)|
11 | 7 | TABLE ACCESS BY INDEX ROWID| ARTICLE | 606 | 50298 | 12 (0)|
12 | 8 | INDEX RANGE SCAN | FIDX__TO_CHAR_ARTICLE_ID | 12 | | 1 (0)|
13 -------------------------------------------------------------------------------------------------
14 Statistics
15 ----------------------------------------------------------
16 0 recursive calls
17 0 db block gets
18 21 consistent gets
19 0 physical reads
20 0 redo size
21 2654 bytes sent via SQL*Net to client
22 469 bytes received via SQL*Net from client
23 2 SQL*Net roundtrips to/from client
24 1 sorts (memory)
25 0 sorts (disk)
26 6 rows processed
大大减少了 consistent gets ,这系统变得更加空闲了。
| 广告合作:400-664-0084 全国热线:400-664-0084 Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号 珠峰网 版权所有 All Rights Reserved
|