diff options
author | unknown <igor@rurik.mysql.com> | 2006-05-02 18:31:20 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-05-02 18:31:20 -0700 |
commit | 21d61c2be79681e12ad31162885a43db70021ea5 (patch) | |
tree | 79f6a11fbe1d4360fbd0457d9546888bd5a4d89c /sql/sql_test.cc | |
parent | 6692dcf7185518743d9dabefd22ef569d90667e6 (diff) | |
download | mariadb-git-21d61c2be79681e12ad31162885a43db70021ea5.tar.gz |
Fixed bug #14292: performance degradation for a benchmark query.
This performance degradation was due to the fact that some
cost evaluation code added into 4.1 in the function find_best was
not merged into the code of the function best_access_path added
together with other code for greedy optimizer.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
The patch does not include a special test case since this performance
degradation is hard to reproduse with a simple example.
TODO: make the function find_best use the function best_access_path
in order to remove duplication of code which might result in incomplete
merges in the future.
mysql-test/r/delete.result:
Fixed bug #14292: performance degradation for a benchmark query.
Adjusted test results.
mysql-test/r/subselect.result:
Fixed bug #14292: performance degradation for a benchmark query.
Adjusted test results.
sql/mysql_priv.h:
Fixed bug #14292: performance degradation for a benchmark query.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
sql/sql_select.cc:
Fixed bug #14292: performance degradation for a benchmark query.
This performance degradation was due to the fact that some
cost evaluation code added into 4.1 in the function find_best was
not merged into the code of the function best_access_path added
together with other code for greedy optimizer.
sql/sql_test.cc:
Fixed bug #14292: performance degradation for a benchmark query.
Added a parameter to the function print_plan. The parameter contains
accumulated cost for a given partial join.
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r-- | sql/sql_test.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 975cc19ea3f..0784685432a 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -230,8 +230,8 @@ TEST_join(JOIN *join) */ void -print_plan(JOIN* join, double read_time, double record_count, - uint idx, const char *info) +print_plan(JOIN* join, uint idx, double record_count, double read_time, + double current_read_time, const char *info) { uint i; POSITION pos; @@ -245,13 +245,15 @@ print_plan(JOIN* join, double read_time, double record_count, DBUG_LOCK_FILE; if (join->best_read == DBL_MAX) { - fprintf(DBUG_FILE,"%s; idx:%u, best: DBL_MAX, current:%g\n", - info, idx, read_time); + fprintf(DBUG_FILE, + "%s; idx:%u, best: DBL_MAX, atime: %g, itime: %g, count: %g\n", + info, idx, current_read_time, read_time, record_count); } else { - fprintf(DBUG_FILE,"%s; idx: %u, best: %g, current: %g\n", - info, idx, join->best_read, read_time); + fprintf(DBUG_FILE, + "%s; idx:%u, best: %g, atime: %g, itime: %g, count: %g\n", + info, idx, join->best_read, current_read_time, read_time, record_count); } /* Print the tables in JOIN->positions */ |