explain extended select count(1) from pos_salesdetail_70 t, pos_salesh_70 s where t.salesId = s.id and s.storeId = '2c8dba1a3d6868ac8df7645a90ff1d4d' and s.storeSysCode = '96870' and s.SalesTime BETWEEN '2024-03-01 00:00:00' AND '2024-04-31 23:59:59'; ========================================================================= |ID|OPERATOR |NAME |EST.ROWS|EST.TIME(us)| ------------------------------------------------------------------------- |0 |SCALAR GROUP BY | |1 |200736 | |1 |└─MERGE JOIN | |550295 |190762 | |2 | ├─TABLE FULL SCAN|s |119742 |58230 | |3 | └─TABLE FULL SCAN|t(idx_salesdetail_salesId)|3425357 |57413 | ========================================================================= Outputs & filters: ------------------------------------- 0 - output([T_FUN_COUNT(*)(0x7f6a34429a40)]), filter(nil), rowset=256 group(nil), agg_func([T_FUN_COUNT(*)(0x7f6a34429a40)]) 1 - output(nil), filter(nil), rowset=256 equal_conds([t.SalesId(0x7f6a34422730) = s.Id(0x7f6a34422b70)(0x7f6a34421e70)]), other_conds(nil) merge_directions([ASC]) 2 - output([s.Id(0x7f6a34422b70)]), filter([s.SalesTime(0x7f6a34428f00) >= '2024-03-01 00:00:00'(0x7f6a344274c0)], [s.StoreId(0x7f6a344243d0) = '2c8dba1a3d6868ac8df7645a90ff1d4d'(0x7f6a34423b10)], [s.StoreSysCode(0x7f6a34425c30) = '96870'(0x7f6a34425370)], [s.SalesTime(0x7f6a34428f00) <= '2024-04-31 23:59:59'(0x7f6a34427d40)]), rowset=256 access([s.Id(0x7f6a34422b70)], [s.StoreId(0x7f6a344243d0)], [s.StoreSysCode(0x7f6a34425c30)], [s.SalesTime(0x7f6a34428f00)]), partitions(p0) is_index_back=false, is_global_index=false, filter_before_indexback[false,false,false,false], range_key([s.Id(0x7f6a34422b70)]), range(MIN ; MAX)always true 3 - output([t.SalesId(0x7f6a34422730)]), filter(nil), rowset=256 access([t.SalesId(0x7f6a34422730)]), partitions(p0) is_index_back=false, is_global_index=false, range_key([t.SalesId(0x7f6a34422730)], [t.id(0x7f6a3442ad10)]), range(MIN,MIN ; MAX,MAX)always true Used Hint: ------------------------------------- /*+ */ Qb name trace: ------------------------------------- stmt_id:0, stmt_type:T_EXPLAIN stmt_id:1, SEL$1 > SEL$EA493D33 Outline Data: ------------------------------------- /*+ BEGIN_OUTLINE_DATA LEADING(@"SEL$EA493D33" ("s"@"SEL$1" "t"@"SEL$1")) USE_MERGE(@"SEL$EA493D33" "t"@"SEL$1") FULL(@"SEL$EA493D33" "s"@"SEL$1") INDEX(@"SEL$EA493D33" "t"@"SEL$1" "idx_salesdetail_salesId") SIMPLIFY_GROUP_BY(@"SEL$1") OPTIMIZER_FEATURES_ENABLE('4.3.3.0') END_OUTLINE_DATA */ Optimization Info: ------------------------------------- s: table_rows:746995 physical_range_rows:746996 logical_range_rows:746996 index_back_rows:0 output_rows:2 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx_posSalesh_storeIdReturnSalesId, idx_pos_salesh_70_custid, idx_pos_salesh_70_storeid_salestype, idx_pos_salesh_70_storesyscode, idx_pos_salesh_70_sysupdatetime, idx_salesh_cb2, idx_salesh_salesdate, idx_salesh_salesmonth, idx_salesh_salesno, idx_salesh_salestime, idx_salesh_salesyear, idx_salesh_storeidsalesdate, idx_salesh_storeid_salesdate, idx_salesh_storeid_salestime, pos_salesh_70] pruned_index_name:[idx_posSalesh_storeIdReturnSalesId, idx_pos_salesh_70_custid, idx_pos_salesh_70_storeid_salestype, idx_pos_salesh_70_sysupdatetime, idx_salesh_salesdate, idx_salesh_salesmonth, idx_salesh_salesno, idx_salesh_salestime, idx_salesh_salesyear, idx_salesh_storeidsalesdate, idx_salesh_storeid_salesdate, idx_salesh_storeid_salestime] stats info:[version=1729980597376403, is_locked=0, is_expired=0] dynamic sampling level:0 estimation method:[OPTIMIZER STATISTICS, STORAGE] t: table_rows:3425356 physical_range_rows:3425357 logical_range_rows:3425357 index_back_rows:0 output_rows:3425357 table_dop:1 dop_method:Table DOP avaiable_index_name:[idx_salesdetail_cb1, idx_salesdetail_cb2, idx_salesdetail_cb3, idx_salesdetail_cb6, idx_salesdetail_salesId, idx_salesdetail_salesmonth, idx_salesdetail_salesyear, idx_salesdetail_storeIdsalesDate, idx_salesdetail_x2, idx_stocker_storeid_selfnum, pos_salesdetail_70] pruned_index_name:[idx_salesdetail_cb1, idx_salesdetail_cb2, idx_salesdetail_cb3, idx_salesdetail_cb6, idx_salesdetail_salesmonth, idx_salesdetail_salesyear, idx_salesdetail_storeIdsalesDate, idx_salesdetail_x2, idx_stocker_storeid_selfnum, pos_salesdetail_70] stats info:[version=1729981941745382, is_locked=0, is_expired=0] dynamic sampling level:0 estimation method:[OPTIMIZER STATISTICS, STORAGE] Plan Type: LOCAL Note: Degree of Parallelisim is 1 because of table property