Kathey Marsden wrote:
But I think I messed up and printed the current cost instead of the
best cost, so I will try to print that out too and see what happens.
Here are the printlns with printing the best cost and also printing the
currentCost of all plan's evaluated. I thought perhaps that for the
passing run I would see the more expensive plan discounted, but in fact
it seems to me that we are just getting different plans for evaluation.
Kathey
select count(*) from (select * from t1 union select * from t3) x1 (c, d),
(select * from t2 union select * from t4) x2 (e, f) where x1.c = x2.e
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:14137.132000000001
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:14137.132000000001 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:5.3663282674826086E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:5.3663282674826086E7 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:6.90255744984E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90255744984E8 bestJoinOrder:{0}
currentCost:6.94063142716E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.94063142716E8 bestJoinOrder:{0,1}
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:12643.436
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:12643.436 bestJoinOrder:{0}
currentCost:3392499.9599999995
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3392499.9599999995 bestJoinOrder:{0}
currentCost:4.9860544042893946E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:4.9860544042893946E7 bestJoinOrder:{0}
currentCost:3392499.9599999995
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3392499.9599999995 bestJoinOrder:{0}
currentCost:6.90273744164E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90273744164E8 bestJoinOrder:{0}
currentCost:6.936789570400001E8
Before rememberBestCost: oldBestCost:6.94063142716E8
After rememberBestCost(), bestCost:6.936789570400001E8 bestJoinOrder:{1,0}
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:14137.132000000001
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:14137.132000000001 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:5.3663282674826086E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:5.3663282674826086E7 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:6.90255744984E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90255744984E8 bestJoinOrder:{0}
currentCost:6.94063142716E8
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:12643.436
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:12643.436 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:69.47999999999999 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:12643.436 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:69.47999999999999 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:14137.132000000001 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:6.936789570400001E8 bestJoinOrder:{1,0}
select count(*) from (select * from t1 union select * from t3) x1 (c, d),
(select * from t2 union select * from t4) x2 (e, f) where x1.c = x2.e
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:14137.132000000001
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:14137.132000000001 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:5.3663282674826086E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:5.3663282674826086E7 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:6.90255744984E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90255744984E8 bestJoinOrder:{0}
currentCost:3.136778744561347E12
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3.136778744561347E12 bestJoinOrder:{0,1}
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:12643.436
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:12643.436 bestJoinOrder:{0}
currentCost:3392499.9599999995
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3392499.9599999995 bestJoinOrder:{0}
currentCost:4.9860544042893946E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:4.9860544042893946E7 bestJoinOrder:{0}
currentCost:3392499.9599999995
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3392499.9599999995 bestJoinOrder:{0}
currentCost:6.90273744164E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90273744164E8 bestJoinOrder:{0}
currentCost:2.6001863922422188E12
Before rememberBestCost: oldBestCost:3.136778744561347E12
After rememberBestCost(), bestCost:2.6001863922422188E12 bestJoinOrder:{1,0}
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:14137.132000000001
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:14137.132000000001 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:5.3663282674826086E7
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:5.3663282674826086E7 bestJoinOrder:{0}
currentCost:3793191.1199999996
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:3793191.1199999996 bestJoinOrder:{0}
currentCost:6.90255744984E8
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:6.90255744984E8 bestJoinOrder:{0}
currentCost:3.136778744561347E12
currentCost:69.47999999999999
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:69.47999999999999 bestJoinOrder:{0}
currentCost:12643.436
Before rememberBestCost: oldBestCost:1.7976931348623157E308
After rememberBestCost(), bestCost:12643.436 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:69.47999999999999 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:12643.436 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:69.47999999999999 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:14137.132000000001 bestJoinOrder:{0}
After modifyAccesPaths(), bestCost:2.6001863922422188E12 bestJoinOrder:{1,0}
used 32574 ms F