SQL> select log_datetime,source_channel,time1,time3 from log_ga,test_timestamp where log_datetime=time1;
no rows selected
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 MERGE JOIN
2 1 SORT (JOIN)
3 2 TABLE ACCESS (FULL) OF 'TEST_TIMESTAMP'
4 1 SORT (JOIN)
5 4 TABLE ACCESS (FULL) OF 'LOG_GA'
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
6 consistent gets
0 physical reads
0 redo size
396 bytes sent via SQL*Net to client
372 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
0 rows processed
SQL>
SQL>
SQL> create index IDX_LOG_GA_LOG_DATETIME on log_ga (log_datetime);
Index created.
SQL>
SQL>
SQL>
SQL> select log_datetime,source_channel,time1,time3 from log_ga,test_timestamp where log_datetime=time1;
no rows selected
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'LOG_GA'
2 1 NESTED LOOPS
3 2 TABLE ACCESS (FULL) OF 'TEST_TIMESTAMP'
4 2 INDEX (RANGE SCAN) OF 'IDX_LOG_GA_LOG_DATETIME' (NON-U
NIQUE)
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
4 consistent gets
0 physical reads
0 redo size
396 bytes sent via SQL*Net to client
372 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
0 rows processed
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/82392/viewspace-144674/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/82392/viewspace-144674/