SQL> select/*+index (m INDX_EST_SALES)*/ m.* from
bks_odds_asian o inner join EST_SALES m on o.order = m.id
where SALES_TIME>trunc(sysdate-1) and s_type is not null;
51 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1050914458
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 2584 | 1011K| 660 (4)| 00:00:03 |
|* 1 | HASH JOIN | | 2584 | 1011K| 660 (4)| 00:00:03 |
| 2 | TABLE ACCESS BY INDEX ROWID| EST_SALES | 959 | 363K| 645 (4)| 00:00:03 |
|* 3 | INDEX FULL SCAN | INDX_EST_SALES | 959 | | 357 (6)| 00:00:02 |
|* 4 | INDEX FAST FULL SCAN | IDX_01 | 33404 | 424K| 14 (8)| 00:00:01 |
------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - access("O"."ORDER"="M"."ID")
3 - access("M"."SALES_TIME">TRUNC([email=SYSDATE@!-1]SYSDATE@!-1[/email]))
filter("M"."SALES_TIME">TRUNC([email=SYSDATE@!-1]SYSDATE@!-1[/email]))
4 - filter("O"."S_TYPE" IS NOT NULL)
Statistics
----------------------------------------------------------
3 recursive calls
0 db block gets
765 consistent gets
0 physical reads
0 redo size
15753 bytes sent via SQL*Net to client
525 bytes received via SQL*Net from client
5 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
51 rows processed
实际select的结果集只有51行。而rows列却是2584