mariadb/storage/connect
Monty 956980971f Update cost for hash and cached joins
The old code did not't correctly add TIME_FOR_COMPARE to rows that are
part of the scan that will be compared with the attached where clause.

Now the cost calculation for hash join and full join cache join are
identical except for HASH_FANOUT (10%)

The cost for a join with keys is now also uniform.
The total cost for a using a key for lookup is calculated in one place as:

(cost_of_finding_rows_through_key(records) + records/TIME_FOR_COMPARE)*
record_count_of_previous_row_combinations + startup_cost

startup_cost is the cost of a creating a temporary table (if needed)

Best_cost now includes the cost of comparing all WHERE clauses and also
cost of joining with previous row combinations.

Other things:
- Optimizer trace is now printing the total costs, including testing the
  WHERE clause (TIME_FOR_COMPARE) and comparing with all previous rows.
- In optimizer trace, include also total cost of query together with the
  final join order. This makes it easier to find out where the cost was
  calculated.
- Old code used filter even if the cost for it was higher than not using a
  filter. This is not corrected.
- When rebasing on 10.11, I noticed some changes to access_cost_factor
  calculation. These changes was not picked as the coming changes
  to filtering will make that code obsolete.
2023-02-02 20:49:35 +03:00
..
mysql-test/connect Update cost for hash and cached joins 2023-02-02 20:49:35 +03:00
.gitignore
ApacheInterface.java
array.cpp
array.h
blkfil.cpp
blkfil.h
block.h
bson.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
bson.h
bsonudf.cpp Merge branch '10.6' into 10.7 2022-11-02 21:06:47 +01:00
bsonudf.h
catalog.h
checklvl.h
Client.java
Client2.java
Client3.java
CMakeLists.txt Merge 10.5 into 10.6 2022-10-25 14:25:42 +03:00
cmgfam.cpp
cmgfam.h
cmgoconn.cpp
cmgoconn.h
colblk.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
colblk.h
connect.cc Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00
connect.h
csort.cpp
csort.h
domdoc.cpp Ensure that source files contain only valid UTF8 encodings (#2188) 2022-08-30 09:21:40 +01:00
domdoc.h
encas.h
engmsg.h
enids.h
filamap.cpp
filamap.h
filamdbf.cpp Merge branch '10.5' into 10.6 2022-11-02 14:33:20 +01:00
filamdbf.h
filamfix.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
filamfix.h
filamgz.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
filamgz.h
filamtxt.cpp
filamtxt.h
filamvct.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
filamvct.h
filamzip.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
filamzip.h
filter.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
filter.h
fmdlex.c
global.h Use memory safe snprintf() in Connect Engine and elsewhere (#2210) 2022-09-28 15:45:25 +01:00
ha_connect.cc Merge 10.7 into 10.8 2022-12-13 18:11:24 +02:00
ha_connect.h Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
inihandl.cpp
inihandl.h
ioapi.c clang15 warnings - unused vars and old prototypes 2023-01-10 17:10:43 +00:00
ioapi.h Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
javaconn.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
javaconn.h
jdbccat.h
JdbcInterface.java
jdbconn.cpp Merge branch '10.5' into 10.6 2022-10-02 22:14:21 +02:00
jdbconn.h
jmgfam.cpp
jmgfam.h
jmgoconn.cpp
jmgoconn.h
json.cpp Merge branch '10.8' into 10.9 2022-10-04 13:23:13 +02:00
json.h
jsonudf.cpp Merge branch '10.6' into 10.7 2022-10-04 07:41:35 +02:00
jsonudf.h
libdoc.cpp Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
libdoc.h
macutil.cpp
macutil.h
maputil.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
maputil.h
MariadbInterface.java
messages.h Remove unused French translations in Connect engine (#2252) 2022-09-02 10:40:33 +01:00
mini-global.h
mongo.cpp
mongo.h
Mongo2Interface.java
Mongo3Interface.java
msgid.h
mycat.cc Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
mycat.h
myconn.cpp Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
myconn.h
MysqlInterface.java
myutil.cpp
myutil.h
noconst.c
odbccat.h
odbconn.cpp Merge 10.5 into 10.6 2022-11-09 09:32:58 +02:00
odbconn.h
OracleInterface.java
os.h
osutil.c
osutil.h
plgcnx.h
plgdbsem.h Remove unused French translations in Connect engine (#2252) 2022-09-02 10:40:33 +01:00
plgdbutl.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
plgodbc.h
plgxml.cpp
plgxml.h
plugutil.cpp Merge branch '10.3' into 10.4 2022-10-01 23:07:26 +02:00
PostgresqlInterface.java
preparse.h
rcmsg.c Remove unused French translations in Connect engine (#2252) 2022-09-02 10:40:33 +01:00
rcmsg.h
reldef.cpp Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
reldef.h
resource.h
rest.def
restget.cpp
tabbson.cpp Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
tabbson.h
tabcmg.cpp
tabcmg.h
tabcol.cpp
tabcol.h
tabdos.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabdos.h
tabext.cpp Merge 10.4 into 10.5 2022-11-09 09:30:37 +02:00
tabext.h MDEV-29687:ODBC tables do not quote identifier names correctly (#2295) 2022-10-21 13:26:06 +01:00
tabfix.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabfix.h
tabfmt.cpp Merge 10.4 into 10.5 2023-01-13 10:18:30 +02:00
tabfmt.h
tabjdbc.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabjdbc.h
tabjmg.cpp
tabjmg.h
tabjson.cpp Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
tabjson.h
table.cpp
tabmac.cpp
tabmac.h
tabmul.cpp Merge 10.8 into 10.9 2022-07-28 10:47:33 +03:00
tabmul.h
tabmysql.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabmysql.h
taboccur.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
taboccur.h
tabodbc.cpp Merge branch '10.4' into 10.5 2022-10-02 14:38:13 +02:00
tabodbc.h
tabpivot.cpp Merge 10.4 into 10.5 2022-07-27 17:17:24 +03:00
tabpivot.h
tabrest.cpp Merge 10.6 into 10.7 2022-07-27 18:26:21 +03:00
tabrest.h
tabsys.cpp
tabsys.h
tabtbl.cpp clang15 warnings - unused vars and old prototypes 2023-01-10 17:10:43 +00:00
tabtbl.h
tabutil.cpp Merge 10.6 into 10.7 2022-07-27 18:26:21 +03:00
tabutil.h
tabvct.cpp
tabvct.h
tabvir.cpp
tabvir.h
tabwmi.cpp Use memory safe snprintf() in Connect Engine and elsewhere (#2210) 2022-09-28 15:45:25 +01:00
tabwmi.h
tabxcl.cpp
tabxcl.h
tabxml.cpp Merge 10.5 into 10.6 2022-07-27 17:52:37 +03:00
tabxml.h
tabzip.cpp
tabzip.h
TestInsert2.java
TestInsert3.java
unzip.c
unzip.h
user_connect.cc
user_connect.h
valblk.cpp Merge branch '10.3' into 10.4 2022-10-01 23:07:26 +02:00
valblk.h
value.cpp Merge 10.3 into 10.4 2023-01-03 16:10:02 +02:00
value.h
xindex.cpp Merge 10.4 into 10.5 2022-12-13 14:39:18 +02:00
xindex.h
xobject.cpp
xobject.h
xtable.h
zip.c Merge branch '10.3' into 10.4 2023-01-10 21:04:17 +01:00
zip.h