... However, MariaDB's JSON function do not allow to compute JSON paths? I tried JSON_EXTRACT and others, none could achieve what I wanted - extract all nodes in the document with the name range_analysis.
Sergei Petrunia
added a comment - ... However, MariaDB's JSON function do not allow to compute JSON paths? I tried JSON_EXTRACT and others, none could achieve what I wanted - extract all nodes in the document with the name range_analysis .
As for pretty-printing, there is JSON_DETAILED function but its output is not as beautiful as the one that EXPLAIN FORMAT=JSON pretty-printer produces.
Example:
"key_parts":
[
"a"
]
}
],
"setup_range_conditions":
[
],
Sergei Petrunia
added a comment - As for pretty-printing, there is JSON_DETAILED function but its output is not as beautiful as the one that EXPLAIN FORMAT=JSON pretty-printer produces.
Example:
"key_parts":
[
"a"
]
}
],
"setup_range_conditions":
[
],
so, it is possible to extract parts of trace using JSON function. You'll need to re-format them, and formatter is not perfect, but still.
Sergei Petrunia
added a comment - WIth holyfoot 's and Serg's input:
mysql> select JSON_DETAILED(JSON_EXTRACT(a, '$**.range_analysis')) from t20\G
*************************** 1. row ***************************
JSON_DETAILED(JSON_EXTRACT(a, '$**.range_analysis')): [
{
"table_scan":
{
"rows": 1000,
"cost": 103.1
},
"potential_range_indexes":
[
{
"index": "a",
"usable": true,
"key_parts":
[
"a"
]
}
],
"setup_range_conditions":
[
],
so, it is possible to extract parts of trace using JSON function. You'll need to re-format them, and formatter is not perfect, but still.
Optimizer trace: print cost and #rows of the join prefix
The names rows_for_plan and cost_for_plan follow MySQL
Also added post-join-operation selectivity cost
Sergei Petrunia
added a comment - Pushed this:
https://github.com/MariaDB/server/commit/2dbe472ed011a951b28434ae8e67945e964d2030
Optimizer trace: print cost and #rows of the join prefix
The names rows_for_plan and cost_for_plan follow MySQL
Also added post-join-operation selectivity cost
MDEV-6111: Optimizer Trace: add tracing for semi-join optimizations
Added:
- "semijoin_strategy_choice" element (actions in advance_sj_state(), name
matches the name in MySQL)
- semijoin_table_pullout element.
UPDATE: filed a MDEV to track the above patch: MDEV-20440.
Sergei Petrunia
added a comment - - edited Pushed this:
http://lists.askmonty.org/pipermail/commits/2019-August/013945.html
http://lists.askmonty.org/pipermail/commits/2019-August/013945.html
commit 4a490d1a993959222deb8bae822f40575586a148 (HEAD -> 10.4, origin/HEAD, origin/10.4, tmp10)
Author: Sergei Petrunia <psergey@askmonty.org>
Date: Sun Aug 25 11:03:19 2019 +0300
MDEV-6111: Optimizer Trace: add tracing for semi-join optimizations
Added:
- "semijoin_strategy_choice" element (actions in advance_sj_state(), name
matches the name in MySQL)
- semijoin_table_pullout element.
UPDATE : filed a MDEV to track the above patch: MDEV-20440 .
People
Varun Gupta (Inactive)
Sergei Golubchik
Votes:
10Vote for this issue
Watchers:
17Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1762.2999999523163,"ttfb":216,"pageVisibility":"visible","entityId":35127,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ca2e0304-0e0d-4965-a327-a84ef667172f","navigationType":0,"readyForUser":1782.1000001430511,"redirectCount":0,"resourceLoadedEnd":1269,"resourceLoadedStart":225.40000009536743,"resourceTiming":[{"duration":163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":225.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":225.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":388.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":163.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":225.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":225.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":388.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":317.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":225.90000009536743,"connectEnd":225.90000009536743,"connectStart":225.90000009536743,"domainLookupEnd":225.90000009536743,"domainLookupStart":225.90000009536743,"fetchStart":225.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":225.90000009536743,"responseEnd":543.2000000476837,"responseStart":543.2000000476837,"secureConnectionStart":225.90000009536743},{"duration":1042.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":226.10000014305115,"connectEnd":226.10000014305115,"connectStart":226.10000014305115,"domainLookupEnd":226.10000014305115,"domainLookupStart":226.10000014305115,"fetchStart":226.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":556,"responseEnd":1268.4000000953674,"responseStart":568.1000001430511,"secureConnectionStart":226.10000014305115},{"duration":322.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":226.40000009536743,"connectEnd":226.40000009536743,"connectStart":226.40000009536743,"domainLookupEnd":226.40000009536743,"domainLookupStart":226.40000009536743,"fetchStart":226.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":226.40000009536743,"responseEnd":549.2000000476837,"responseStart":549.2000000476837,"secureConnectionStart":226.40000009536743},{"duration":329.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":226.5,"connectEnd":226.5,"connectStart":226.5,"domainLookupEnd":226.5,"domainLookupStart":226.5,"fetchStart":226.5,"redirectEnd":0,"redirectStart":0,"requestStart":226.5,"responseEnd":556.2000000476837,"responseStart":556.2000000476837,"secureConnectionStart":226.5},{"duration":335.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":226.70000004768372,"connectEnd":226.70000004768372,"connectStart":226.70000004768372,"domainLookupEnd":226.70000004768372,"domainLookupStart":226.70000004768372,"fetchStart":226.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":226.70000004768372,"responseEnd":562.4000000953674,"responseStart":562.4000000953674,"secureConnectionStart":226.70000004768372},{"duration":377.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":226.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":226.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":604.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":378.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":227,"connectEnd":227,"connectStart":227,"domainLookupEnd":227,"domainLookupStart":227,"fetchStart":227,"redirectEnd":0,"redirectStart":0,"requestStart":227,"responseEnd":605.2000000476837,"responseStart":605.1000001430511,"secureConnectionStart":227},{"duration":397.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":227.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":227.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":624.5,"responseStart":0,"secureConnectionStart":0},{"duration":393,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":227.40000009536743,"connectEnd":227.40000009536743,"connectStart":227.40000009536743,"domainLookupEnd":227.40000009536743,"domainLookupStart":227.40000009536743,"fetchStart":227.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":227.40000009536743,"responseEnd":620.4000000953674,"responseStart":620.4000000953674,"secureConnectionStart":227.40000009536743},{"duration":773.3999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":229.10000014305115,"connectEnd":229.10000014305115,"connectStart":229.10000014305115,"domainLookupEnd":229.10000014305115,"domainLookupStart":229.10000014305115,"fetchStart":229.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":898.7000000476837,"responseEnd":1002.5,"responseStart":909.6000001430511,"secureConnectionStart":229.10000014305115},{"duration":1031.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":237.5,"connectEnd":237.5,"connectStart":237.5,"domainLookupEnd":237.5,"domainLookupStart":237.5,"fetchStart":237.5,"redirectEnd":0,"redirectStart":0,"requestStart":1003.2999999523163,"responseEnd":1269,"responseStart":1098.7999999523163,"secureConnectionStart":237.5},{"duration":547.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":857.4000000953674,"connectEnd":857.4000000953674,"connectStart":857.4000000953674,"domainLookupEnd":857.4000000953674,"domainLookupStart":857.4000000953674,"fetchStart":857.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1003.1000001430511,"responseEnd":1405.2000000476837,"responseStart":1373.7000000476837,"secureConnectionStart":857.4000000953674},{"duration":167.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1584.1000001430511,"connectEnd":1584.1000001430511,"connectStart":1584.1000001430511,"domainLookupEnd":1584.1000001430511,"domainLookupStart":1584.1000001430511,"fetchStart":1584.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":1584.1000001430511,"responseEnd":1751.6000001430511,"responseStart":1751.6000001430511,"secureConnectionStart":1584.1000001430511},{"duration":286.2999999523163,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1639.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1639.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1925.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":13,"responseStart":216,"responseEnd":224,"domLoading":223,"domInteractive":1975,"domContentLoadedEventStart":1975,"domContentLoadedEventEnd":2055,"domComplete":2149,"loadEventStart":2150,"loadEventEnd":2150,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1928.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1929.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1929.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1932.7999999523163},{"name":"activityTabFullyLoaded","time":2078.100000143051}],"measures":[],"correlationId":"aa1c387cb6e35e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":127,"dbReadsTimeInMs":27,"dbConnsTimeInMs":37,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
... However, MariaDB's JSON function do not allow to compute JSON paths? I tried JSON_EXTRACT and others, none could achieve what I wanted - extract all nodes in the document with the name range_analysis.