summaryrefslogtreecommitdiff
path: root/mysql-test/main/explain_json.result
Commit message (Collapse)AuthorAgeFilesLines
* Revert the commit with MDEV-28926: Add time spent on query optimizer to JSON ↵bb-10.10-spetrunia3Sergei Petrunia2022-07-251-18/+0
| | | | | | | | | | | | | | | | | ANALYZE It will go into 10.11. Author: Luis Eduardo Oliveira Lizardo <108760288+mariadb-LuisLizardo@users.noreply.github.com> Date: Mon Jul 18 17:48:01 2022 +0200 MDEV-28926 Add time spent on query optimizer to JSON ANALYZE (#2193) * Add query optimizer timer to ANALYZE FORMAT=JSON * Adapt tests and results * Change logic to always close the writer after printing query blocks
* MDEV-28926 Add time spent on query optimizer to JSON ANALYZE (#2193)Luis Eduardo Oliveira Lizardo2022-07-181-0/+18
| | | | | | | * Add query optimizer timer to ANALYZE FORMAT=JSON * Adapt tests and results * Change logic to always close the writer after printing query blocks
* Merge 10.7 into 10.8Marko Mäkelä2022-04-271-2/+0
|\
| * Merge 10.5 into 10.6Marko Mäkelä2022-04-211-2/+0
| |\
| | * Merge 10.4 into 10.5Marko Mäkelä2022-04-211-2/+0
| | |\
| | | * Merge 10.3 into 10.4Marko Mäkelä2022-04-211-2/+0
| | | |\
| | | | * MDEV-27699 ANALYZE FORMAT=JSON fields are incorrect for UNION ALL queriesOleg Smirnov2022-04-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNION ALL queries are a subject of optimization introduced in MDEV-334 when creation of a temporary table is skipped. While there is a check for this optimization in Explain_union::print_explain() there was no such in Explain_union::print_explain_json(). This resulted in printing irrelevant data like: "union_result": { "table_name": "<union2,3>", "access_type": "ALL", "r_loops": 0, "r_rows": null in case when creation of the temporary table was actually optimized out. This commits adds a check whether the temporary table was actually created during the UNION ALL processing and eliminates printing of the irrelevant data.
* | | | | MDEV-27206: [ERROR] Duplicated key: cause, Assertion `is_uniq_key' failed ↵Sergei Krivonos2021-12-101-0/+13
| | | | | | | | | | | | | | | | | | | | with optimizer trace
* | | | | MDEV-27204: [ERROR] Json_writer: a member name was expected, Assertion `got_namebb-10.8-MDEV-27204-v2Sergei Petrunia2021-12-091-13/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Adjusting Sergei Krivonos's patch] "duplicates_removal" may contain multiple elements inside it and so should have a JSON array as a value (and not object).
* | | | | MDEV-27036: resolve duplicated key issues of JSON tracing outputs:Sergei Krivonos2021-11-261-758/+1046
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-27036: repeated "table" key resolve for print_explain_json MDEV-27036: duplicated keys in best_access_path MDEV-27036: Explain_aggr_filesort::print_json_members: resolve duplicated "filesort" member in Json object MDEV-27036: Explain_basic_join:: print_explain_json_interns fixed start_dups_weedout case for main.explain_json test
* | | | MDEV-8334: Rename utf8 to utf8mb3Rucha Deodhar2021-05-191-1/+1
|/ / / | | | | | | | | | | | | | | | This patch changes the main name of 3 byte character set from utf8 to utf8mb3. New old_mode UTF8_IS_UTF8MB3 is added and set TRUE by default, so that utf8 would mean utf8mb3. If not set, utf8 would mean utf8mb4.
* | | Updated optimizer costs in multi_range_read_info_const() and sql_select.ccMonty2020-03-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - multi_range_read_info_const now uses the new records_in_range interface - Added handler::avg_io_cost() - Don't calculate avg_io_cost() in get_sweep_read_cost if avg_io_cost is not 1.0. In this case we trust the avg_io_cost() from the handler. - Changed test_quick_select to use TIME_FOR_COMPARE instead of TIME_FOR_COMPARE_IDX to align this with the rest of the code. - Fixed bug when using test_if_cheaper_ordering where we didn't use keyread if index was changed - Fixed a bug where we didn't use index only read when using order-by-index - Added keyread_time() to HEAP. The default keyread_time() was optimized for blocks and not suitable for HEAP. The effect was the HEAP prefered table scans over ranges for btree indexes. - Fixed get_sweep_read_cost() for HEAP tables - Ensure that range and ref have same cost for simple ranges Added a small cost (MULTI_RANGE_READ_SETUP_COST) to ranges to ensure we favior ref for range for simple queries. - Fixed that matching_candidates_in_table() uses same number of records as the rest of the optimizer - Added avg_io_cost() to JT_EQ_REF cost. This helps calculate the cost for HEAP and temporary tables better. A few tests changed because of this. - heap::read_time() and heap::keyread_time() adjusted to not add +1. This was to ensure that handler::keyread_time() doesn't give higher cost for heap tables than for normal tables. One effect of this is that heap and derived tables stored in heap will prefer key access as this is now regarded as cheap. - Changed cost for index read in sql_select.cc to match multi_range_read_info_const(). All index cost calculation is now done trough one function. - 'ref' will now use quick_cost for keys if it exists. This is done so that for '=' ranges, 'ref' is prefered over 'range'. - scan_time() now takes avg_io_costs() into account - get_delayed_table_estimates() uses block_size and avg_io_cost() - Removed default argument to test_if_order_by_key(); simplifies code
* | | MDEV-20854: ANALYZE for statements: not clear where the time is spentSergei Petrunia2019-11-121-8/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Count the "gap" time between table accesses and display it as r_other_time_ms in the "table" element. * The advantage of this approach is that it doesn't add any new my_timer_cycles() calls. * The disadvantage is that the definition of what is done during "other time" is not that clear: it includes checking the WHERE (for this table), constructing index lookup tuple (for the next table) writing to GROUP BY temporary table (as we dont account for that time separately [yet], etc)
* | MDEV-17903: New optimizer defaults: change optimize_join_buffer_size to be ONVarun Gupta2019-02-191-8/+8
| | | | | | | | optimize_join_buffer_size is switched ON.
* | Merge branch '10.4' into bb-10.4-mdev16188Igor Babaev2019-02-031-0/+1
|\ \
| * | MDEV-15253: Default optimizer setting changes for MariaDB 10.4Varun Gupta2018-12-091-0/+1
| |/ | | | | | | | | use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
* | MDEV-16188 Use in-memory PK filters built from range index scansIgor Babaev2019-02-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | This patch contains a full implementation of the optimization that allows to use in-memory rowid / primary filters built for range   conditions over indexes. In many cases usage of such filters reduce   the number of disk seeks spent for fetching table rows. In this implementation the choice of what possible filter to be applied   (if any) is made purely on cost-based considerations. This implementation re-achitectured the partial implementation of the feature pushed by Galina Shalygina in the commit 8d5a11122c32f4d9eb87536886c6e893377bdd07. Besides this patch contains a better implementation of the generic   handler function handler::multi_range_read_info_const() that takes into account gaps between ranges when calculating the cost of range index scans. It also contains some corrections of the implementation of the handler function records_in_range() for MyISAM. This patch supports the feature for InnoDB and MyISAM.
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-0/+1646