summaryrefslogtreecommitdiff
path: root/sql/sql_explain.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-10372: EXPLAIN fixes for recursive CTEs, including FORMAT=JSONSergei Petrunia2016-08-081-1/+6
| | | | | | | - Tabular EXPLAIN now prints "RECURSIVE UNION". - There is a basic implementation of EXPLAIN FORMAT=JSON. - it produces "recursive_union" JSON struct - No other details or ANALYZE support, yet.
* Merge branch '10.2' into 10.2-mdev9864Galina Shalygina2016-05-081-134/+116
|
* MDEV-9652: EXPLAIN FORMAT=JSON should show outer_ref_condSergei Petrunia2016-02-281-0/+6
| | | | Show outer_ref_condition in EXPLAIN FORMAT=JSON output.
* Fixed compile warnings on SolarisMonty2015-11-201-2/+2
|
* MDEV-8830: Weird output in the error logSergei Petrunia2015-10-051-1/+0
| | | | Remove debug printout that was accidentally left in place
* Fix typos in JSON MRR outputSergei Petrunia2015-09-241-0/+3
|
* MDEV-8829: Assertion `0' failed in Explain_table_access::tag_to_jsonSergei Petrunia2015-09-241-0/+38
| | | | - Add EXPLAIN/ANALYZE FORMAT=JSON handling for a few special cases.
* MDEV-7970: EXPLAIN FORMAT=JSON does not print HAVINGOleksandr Byelkin2015-09-181-1/+14
| | | | Printing non-trivial HAVING added.
* MDEV-6152: Remove calls to current_thd while creating ItemMonty2015-08-271-65/+93
| | | | | | | | - Part 3: Adding mem_root to push_back() and push_front() Other things: - Added THD as an argument to some partition functions. - Added memory overflow checking for XML tag's in read_xml()
* Stage 2 of MDEV-6152:Monty2015-08-211-34/+38
| | | | | | | | - Added mem_root to all calls to new Item - Added private method operator new(size_t size) to Item to ensure that we always use a mem_root when creating an item. This saves use once call to current_thd per Item creation
* MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-49/+56
| | | | | | | Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
* Tabular ANALYZE must get its data from execution trackerSergei Petrunia2015-07-021-2/+30
|
* MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cacheSergei Petrunia2015-07-011-16/+28
| | | | | | | Fixes over the original patch: - Fix variable/class/other names - Fix the JSON output to be in line with the output of other JSON constructs we produce
* MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cacheOleksandr Byelkin2015-06-301-1/+29
|
* MDEV-6995: EXPLAIN JSON and ORDER BY, GROUP BY, etcSergei Petrunia2015-06-061-39/+62
| | | | | - Make ANALYZE correctly remember and report filesort() calls - Temp.table use is collected but only basic info is reported.
* MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP ROSergey Vojtovich2015-05-131-1/+1
| | | | | | Added THD argument to select_result and all derivative classes. This reduces number of pthread_getspecific calls from 796 to 776 per OLTP RO transaction.
* MDEV-7951 - sql_alloc() takes 0.25% in OLTP ROSergey Vojtovich2015-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | sql_alloc() has additional costs compared to direct mem_root allocation: - function call: it is defined in a separate translation unit and can't be inlined - it needs to call pthread_getspecific() to get THD::mem_root It is called dozens of times implicitely at least by: - List<>::push_back() - List<>::push_front() - new (for Sql_alloc derived classes) - sql_memdup() Replaced lots of implicit sql_alloc() calls with direct mem_root allocation, passing through THD pointer whenever it is needed. Number of sql_alloc() calls reduced 345 -> 41 per OLTP RO transaction. pthread_getspecific() overhead dropped 0.76 -> 0.59 sql_alloc() overhed dropped 0.25 -> 0.06
* Fix a typo, s/false/NULL/.Sergei Petrunia2015-04-141-1/+1
|
* MDEV-7836: ANALYZE FORMAT=JSON should provide info about GROUP/ORDER BYSergei Petrunia2015-04-121-2/+18
| | | | | Fix EXPLAIN FORMAT=JSON to produce output that's not worse than the tabular form.
* MergeSergei Petrunia2015-04-121-33/+26
|\
| * MDEV-7835: ANALYZE FORMAT=JSON should show buffer sizesOleksandr Byelkin2015-04-091-0/+1
| |
| * MDEV-7856: EXPLAIN FORMAT=JSON should show partitionsOleksandr Byelkin2015-04-091-33/+25
| |
* | MDEV-7836: ANALYZE FORMAT=JSON should provide info about GROUP/ORDER BYSergei Petrunia2015-04-121-58/+220
|/ | | | Provide basic info about sorting/grouping done by the queries.
* MDEV-7860: EXPLAIN FORMAT=JSON crashes for loose scan querySergei Petrunia2015-04-081-2/+8
| | | | | | | (Based on original patch by Sanja Byelkin) Make the code that produces JSON output handle LooseScan quick select. The output we produce is compatible with MySQL 5.6.
* MDEV-7899: 10.1 is 3% slower than 10.0 in OLTP ROSergei Petrunia2015-04-071-2/+2
| | | | | | | | | - Remove ANALYZE's timing code off the the execution path of regular SELECTs. - Improve the tracker that tracks counts/execution times of SELECTs or DML statements: = regular execution just increments counters = ANALYZE will also collect timings.
* MDEV-7904: ANALYZE FORMAT=JSON doesn't print r_rows for union outputSergei Petrunia2015-04-041-0/+17
| | | | Print r_rows. There is no table tracking for reading from tmp table, yet.
* MDEV-7833:ANALYZE FORMAT=JSON and Range checked for each recordOleksandr Byelkin2015-04-031-5/+101
|
* MDEV-7812: ANALYZE FORMAT=JSON UPDATE/DELETE doesnt print the r_total_time_msOleksandr Byelkin2015-03-291-1/+5
| | | | | | Tracking total time added in UPDATE/DELETE Fixed selectivity calculation in UPDATE/DELETE Macro definitions of time tracting fixed.
* MDEV-7648: Extra data in ANALYZE FORMAT=JSON $stmtSergei Petrunia2015-03-241-39/+5
| | | | | | Switch from relying on PERFORMANCE_SCHEMA to using our own hooks for counting the time spent reading rows from tables.
* MDEV-7648: Extra data in ANALYZE FORMAT=JSON $stmtSergei Petrunia2015-03-071-1/+46
| | | | | | | | | Show total execution time (r_total_time_ms) for various parts of the query: 1. time spent in SELECTs 2. time spent reading rows from storage engines #2 currently gets the data from P_S.
* MDEV-7674: ANALYZE shows r_rows=0Sergei Petrunia2015-03-071-16/+11
| | | | Change r_rows to be double
* EXPLAIN JSON: Print out the "expensive constant condition" attached to joins.Sergei Petrunia2014-12-061-4/+25
|
* EXPLAIN FORMAT=JSON: Full scan on NULL key (join case)Sergei Petrunia2014-12-061-0/+8
|
* EXPLAIN FORMAT=JSON: Support "range checked for each record"Sergei Petrunia2014-12-061-11/+31
|
* EXPLAIN FORMAT=JSON: Support range+MRR plans (when MRR is used but BKA is not)Sergei Petrunia2014-12-061-0/+3
|
* my_alloc.cmariadb-10.1.2Monty2014-12-051-8/+26
| | | | | | | | | | | | | | | | | - Changed 0x%lx -> %p array.c: - Static (preallocated) buffer can now be anywhere my_sys.h - Define MY_INIT_BUFFER_USED sql_delete.cc & sql_lex.cc - Use memroot when allocating classes (avoids call to current_thd) sql_explain.h: - Use preallocated buffers sql_explain.cc: - Use preallocated buffers and memroot sql_select.cc: - Use multi_alloc_root() instead of many alloc_root() - Update calls to Explain
* cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-041-4/+4
| | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)
* Merge branch '10.1' into bb-10.1-mergeSergei Golubchik2014-12-031-100/+981
|\
| * EXPLAIN FORMAT=JSONSergei Petrunia2014-12-021-3/+20
| | | | | | | | | | Add support for semi-join strategies: FirstMatch, DuplicateWeedout, LooseScan.
| * EXPLAIN FORMAT=JSON: support SJ-MaterializationSergei Petrunia2014-12-011-15/+60
| | | | | | | | | | | | | | | | - Switch Explain data structure from "flat" representation of SJ-Materialization into nested one. - Update functions that print tabular output to operate on the nested structure. - Add function to generate JSON output.
| * EXPLAIN FORMAT=JSON: support EXPLAIN FORMAT=JSON INSERT ...Sergei Petrunia2014-11-291-4/+15
| |
| * ANALYZE FORMAT=JSON: better output and testsSergei Petrunia2014-11-291-6/+38
| | | | | | | | | | | | - Print r_loops - Always print r_* members. Print NULL values if no scans took place - Added testcases.
| * EXPLAIN FORMAT=JSON: Add support for non-merged semi-joinsSergei Petrunia2014-11-291-1/+25
| |
| * EXPLAIN FORMAT=JSON: support derived tablesSergei Petrunia2014-11-281-8/+29
| |
| * EXPLAIN FORMAT=JSON: Add support for single-table UPDATE/DELETE.Sergei Petrunia2014-11-281-18/+295
| |
| * EXPLAIN FORMAT=JSON: support join bufferingSergei Petrunia2014-11-271-4/+35
| | | | | | | | | | | | | | | | | | - Basic support for JOIN buffering - The output is not polished but catches the main point: tab->select_cond and tab->cache_select->cond are printed separately. - Hash join support is poor still. - Also fixed identation in JOIN_TAB::save_explain_data
| * EXPLAIN FORMAT=JSON: further developmentSergei Petrunia2014-11-271-9/+35
| | | | | | | | | | | | | | | | | | | | Writing JSON: - Fix a bug in Single_line_formatting_helper - Add Json_writer_nesting_guard - safety class EXPLAIN JSON support - Add basic subquery support - Add tests for UNION/UNION ALL.
| * Merge ../10.1-explain-json-r4 into 10.1Sergei Petrunia2014-11-271-81/+478
| |\
| | * Make testsuite to passSergei Petrunia2014-11-211-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | - Drop all tables in explain_json.test - Tabular form should print ref='' when type='fulltext' (another peculiarity of the traditional EXPLAIN format) - String_list::append_str should allocate memory for \0, too - Some temporary code for EXPLAIN JSON and join buffering.
| | * Merge ../10.1 into bb-10.1-explain-jsonSergei Petrunia2014-10-151-0/+2
| | |\