=== Range analyzer === lots.tsClosed IS NULL (gdb) print found_records $59 = 243422 (gdb) p cost $58 = {io_count = 243423, avg_io_cost = 1, cpu_cost = 48684.410000000003, mem_cost = 0, import_cost = 0}
contractNumber='1478876' (gdb) print found_records $60 = 28600 (gdb) p cost $61 = {io_count = 28601, avg_io_cost = 1, cpu_cost = 5720.0100000000002, mem_cost = 0, import_cost = 0}
As a result, we have: (gdb) print read_time $62 = 34321.010000000002 (gdb) print best_records $63 = 28600
=== Index Merge T@10 : | | | | | | | | | | | | info: ROR key scans (original): tsClosed,contractNumber T@10 : | | | | | | | | | | | | info: ROR key scans (ordered): contractNumber,tsClosed
T@10 : | | | | | | | | | | | >ror_intersect_add T@10 : | | | | | | | | | | | | info: Current out_rows= 2.13715e+06 T@10 : | | | | | | | | | | | | info: Adding scan on contractNumber T@10 : | | | | | | | | | | | | info: is_cpk_scan: 0 T@10 : | | | | | | | | | | | | >ror_scan_selectivity T@10 : | | | | | | | | | | | | | info: sel_arg step T@10 : | | | | | | | | | | | | | info: Selectivity multiplier: 0.0133823 T@10 : | | | | | | | | | | | | | info: Returning multiplier: 0.0133823 T@10 : | | | | | | | | | | | | <ror_scan_selectivity (gdb) p intersect->out_rows $69 = 28600 (gdb) p intersect->index_records $70 = 28600 (gdb) p intersect->index_scan_costs $71 = 602.50860420650099 (gdb) p intersect->total_cost $72 = 17919.86261827108
T@10 : | | | | | | | | | | | >ror_intersect_add T@10 : | | | | | | | | | | | | info: Current out_rows= 28600 T@10 : | | | | | | | | | | | | info: Adding scan on tsClosed T@10 : | | | | | | | | | | | | info: is_cpk_scan: 0 T@10 : | | | | | | | | | | | | >ror_scan_selectivity T@10 : | | | | | | | | | | | | | info: sel_arg step T@10 : | | | | | | | | | | | | | info: Selectivity multiplier: 0.1139 T@10 : | | | | | | | | | | | | | info: Returning multiplier: 0.1139 T@10 : | | | | | | | | | | | | <ror_scan_selectivity T@10 : | | | | | | | | | | | | info: ROR-intersect is covering now (gdb) p intersect->out_rows $73 = 3257.5451816248915 (gdb) p intersect->index_records $74 = 272022 (gdb) p intersect->index_scan_costs $75 = 5723.2619502868065 (gdb) p intersect->total_cost $76 = 5723.2619502868065
=== Range analyzer ===
lots.tsClosed IS NULL
(gdb) print found_records
$59 = 243422
(gdb) p cost
$58 = {io_count = 243423, avg_io_cost = 1, cpu_cost = 48684.410000000003, mem_cost = 0, import_cost = 0}
contractNumber= '1478876'
(gdb) print found_records
$60 = 28600
(gdb) p cost
$61 = {io_count = 28601, avg_io_cost = 1, cpu_cost = 5720.0100000000002, mem_cost = 0, import_cost = 0}
As a result, we have:
(gdb) print read_time
$62 = 34321.010000000002
(gdb) print best_records
$63 = 28600
=== Index Merge contractNumber tsClosed
T@10 : | | | | | | | | | | | | info: ROR key scans (original): tsClosed,
T@10 : | | | | | | | | | | | | info: ROR key scans (ordered): contractNumber,
T@10 : | | | | | | | | | | | >ror_intersect_add selectivity selectivity >index_ records >index_ scan_costs >total_ cost
T@10 : | | | | | | | | | | | | info: Current out_rows= 2.13715e+06
T@10 : | | | | | | | | | | | | info: Adding scan on contractNumber
T@10 : | | | | | | | | | | | | info: is_cpk_scan: 0
T@10 : | | | | | | | | | | | | >ror_scan_
T@10 : | | | | | | | | | | | | | info: sel_arg step
T@10 : | | | | | | | | | | | | | info: Selectivity multiplier: 0.0133823
T@10 : | | | | | | | | | | | | | info: Returning multiplier: 0.0133823
T@10 : | | | | | | | | | | | | <ror_scan_
(gdb) p intersect->out_rows
$69 = 28600
(gdb) p intersect-
$70 = 28600
(gdb) p intersect-
$71 = 602.50860420650099
(gdb) p intersect-
$72 = 17919.86261827108
T@10 : | | | | | | | | | | | >ror_intersect_add selectivity selectivity >index_ records >index_ scan_costs >total_ cost
T@10 : | | | | | | | | | | | | info: Current out_rows= 28600
T@10 : | | | | | | | | | | | | info: Adding scan on tsClosed
T@10 : | | | | | | | | | | | | info: is_cpk_scan: 0
T@10 : | | | | | | | | | | | | >ror_scan_
T@10 : | | | | | | | | | | | | | info: sel_arg step
T@10 : | | | | | | | | | | | | | info: Selectivity multiplier: 0.1139
T@10 : | | | | | | | | | | | | | info: Returning multiplier: 0.1139
T@10 : | | | | | | | | | | | | <ror_scan_
T@10 : | | | | | | | | | | | | info: ROR-intersect is covering now
(gdb) p intersect->out_rows
$73 = 3257.5451816248915
(gdb) p intersect-
$74 = 272022
(gdb) p intersect-
$75 = 5723.2619502868065
(gdb) p intersect-
$76 = 5723.2619502868065