If I try to remove the COMPRESSED attribute, I get this:
DOUBLE_PREC_HB
"filtered": 92.96875,
"r_filtered": 0,
JSON_HB
"filtered": 93,
"r_filtered": 0,
DOUBLE_PREC_HB becomes just as bad as JSON_HB. It looks like the good estimate in the original report has been an accident.
Sergei Petrunia
added a comment - Summarizing the report data:
DOUBLE_PREC_HB
"filtered": 3.846199989,
"r_filtered": 0,
JSON
"filtered": 93,
"r_filtered": 0,
If I try to remove the COMPRESSED attribute, I get this:
DOUBLE_PREC_HB
"filtered": 92.96875,
"r_filtered": 0,
JSON_HB
"filtered": 93,
"r_filtered": 0,
DOUBLE_PREC_HB becomes just as bad as JSON_HB. It looks like the good estimate in the original report has been an accident.
The column is actually too short to be compressed.
Status counters confirm this: no [de]compressions happen during the test run:
MariaDB [test]> show status like '%compressions';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Column_compressions | 0 |
| Column_decompressions | 0 |
+-----------------------+-------+
2 rows in set (0.003 sec)
Sergei Petrunia
added a comment - The column is actually too short to be compressed.
Status counters confirm this: no [de] compressions happen during the test run:
MariaDB [test]> show status like '%compressions';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| Column_compressions | 0 |
| Column_decompressions | 0 |
+-----------------------+-------+
2 rows in set (0.003 sec)
The JSON_HB histograms are the same. The DOUBLE_PREC_HB histograms are different.
Compressed:
(I've done some manual reformatting to make the differences more apparent)
MariaDB [test]> select decode_histogram(hist_type,histogram) from save10;
Sergei Petrunia
added a comment - I compare the histograms that were produced when
the testcase used COMPRESSED column
the testcase didn't use COMPRESSED column.
The JSON_HB histograms are the same. The DOUBLE_PREC_HB histograms are different.
Compressed:
(I've done some manual reformatting to make the differences more apparent)
MariaDB [test]> select decode_histogram(hist_type,histogram) from save10;
0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.00000,0.04001,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.04001,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.04001,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.04001,
0.00000,0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.03999,
0.00000,0.00000,0.00000,0.00000,0.04001,
0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.04001,0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.04001,0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.00000,0.04001,0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.00000,0.04001,0.00000,0.00000,0.00000,0.03999,0.00000,0.00000,0.00000,0.04001,0.00000,0.00000,0.00000 |
Non-compressed:
MariaDB [test]> select decode_histogram(hist_type,histogram) from save12;
0.00000,0.00000,0.00000,0.04056,
0.00000,0.00000,0.00000,0.00000,0.03880,
0.00000,0.00000,0.00000,0.00000,0.00000,0.02292,
0.00000,0.00000,0.00000,0.00000,0.05292,
0.00000,0.00000,0.00000,0.00000,0.08112,
0.00000,0.00000,0.00000,0.00000,0.01411,
0.00000,0.00000,0.00000,0.00000,0.05644,
0.00000,0.00000,0.00000,0.00000,0.04585,
0.00000,0.00000,0.00000,0.00000,0.03703,
0.00000,0.00000,0.00000,0.00000,0.02998,
0.00000,0.00000,0.00000,0.00000,0.00000, 0.02293,
0.00000,0.00000,0.00000,0.00000,0.07936,
0.00000,0.00000,0.00000,0.00000,0.01587,
0.00000,0.00000,0.00000,0.00000,0.05290,
0.00000,0.00000,0.00000,0.00000,0.06526,0.00000,0.00000,0.00000,0.00000,0.02293,0.00000,0.00000,0.00000,0.00000,0.02116,0.00000,0.00000,0.00000,0.00000,0.07407,0.00000,0.00000,0.00000,0.00000,0.04233,0.00000,0.00000,0.00000,0.00000,0.00000,0.05115,0.00000,0.00000,0.00000,0.00000,0.06525,0.00000,0.00000,0.00000,0.00000,0.02293,0.00000,0.00000,0.00000,0.00000,0.01587,0.00000,0.00000,0.00000,0.00706,0.00000,0.00000,0.00000,0.02116,0.00000,0.00000,0.00000 |
The condition is impossible to satisfy but the optimizer doesn't recognize that.
The ranges it is estimating and the estimates:
DOUBLE_PREC_HB, non-COMPRESSED:
"rows_estimation": [
{
"selectivity_for_indexes": [],
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.9296875
}
],
"cond_selectivity": 0.9296875
},
DOUBLE_PREC_HB, COMPRESSED:
"rows_estimation": [
{
"selectivity_for_indexes": [],
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.038462
}
],
"cond_selectivity": 0.038462
},
JSON:
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.93
}
],
"cond_selectivity": 0.93
},
what would be the right selectivity for t.a >= 'c'? The two values that are less are aaaaa and bbbbb.
sel = (26 - 2)/26.= 0.92, which agrees with the JSON_HB selectivity.
Sergei Petrunia
added a comment - The condition is impossible to satisfy but the optimizer doesn't recognize that.
The ranges it is estimating and the estimates:
DOUBLE_PREC_HB, non-COMPRESSED:
"rows_estimation": [
{
"selectivity_for_indexes": [],
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.9296875
}
],
"cond_selectivity": 0.9296875
},
DOUBLE_PREC_HB, COMPRESSED:
"rows_estimation": [
{
"selectivity_for_indexes": [],
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.038462
}
],
"cond_selectivity": 0.038462
},
JSON:
"selectivity_for_columns": [
{
"column_name": "a",
"ranges": ["c <= a"],
"selectivity_from_histogram": 0.93
}
],
"cond_selectivity": 0.93
},
what would be the right selectivity for t.a >= 'c' ? The two values that are less are aaaaa and bbbbb.
sel = (26 - 2)/26.= 0.92, which agrees with the JSON_HB selectivity.
Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.
Julien Fritsch
added a comment - Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.
Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.
JiraAutomate
added a comment - Automated message:
----------------------------
Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.
People
Sergei Petrunia
Elena Stepanova
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":974.8999999761581,"ttfb":279.89999997615814,"pageVisibility":"visible","entityId":106752,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"66f148d0-84e6-4816-ae44-7814f671f094","navigationType":0,"readyForUser":1059.7999999523163,"redirectCount":0,"resourceLoadedEnd":1139.5,"resourceLoadedStart":284.5,"resourceTiming":[{"duration":282.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":284.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":284.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":566.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":282.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":284.60000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":284.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":567.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":291.3000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":284.7999999523163,"connectEnd":284.7999999523163,"connectStart":284.7999999523163,"domainLookupEnd":284.7999999523163,"domainLookupStart":284.7999999523163,"fetchStart":284.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":284.7999999523163,"responseEnd":576.1000000238419,"responseStart":576.1000000238419,"secureConnectionStart":284.7999999523163},{"duration":316.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":285,"connectEnd":285,"connectStart":285,"domainLookupEnd":285,"domainLookupStart":285,"fetchStart":285,"redirectEnd":0,"redirectStart":0,"requestStart":285,"responseEnd":601.3999999761581,"responseStart":601.3999999761581,"secureConnectionStart":285},{"duration":319.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":285.2000000476837,"connectEnd":285.2000000476837,"connectStart":285.2000000476837,"domainLookupEnd":285.2000000476837,"domainLookupStart":285.2000000476837,"fetchStart":285.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":285.2000000476837,"responseEnd":605,"responseStart":605,"secureConnectionStart":285.2000000476837},{"duration":320.3000000715256,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":285.2999999523163,"connectEnd":285.2999999523163,"connectStart":285.2999999523163,"domainLookupEnd":285.2999999523163,"domainLookupStart":285.2999999523163,"fetchStart":285.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":285.2999999523163,"responseEnd":605.6000000238419,"responseStart":605.6000000238419,"secureConnectionStart":285.2999999523163},{"duration":320.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":285.5,"connectEnd":285.5,"connectStart":285.5,"domainLookupEnd":285.5,"domainLookupStart":285.5,"fetchStart":285.5,"redirectEnd":0,"redirectStart":0,"requestStart":285.5,"responseEnd":606,"responseStart":606,"secureConnectionStart":285.5},{"duration":322.1999999284744,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":285.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":285.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":607.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":320.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":285.89999997615814,"connectEnd":285.89999997615814,"connectStart":285.89999997615814,"domainLookupEnd":285.89999997615814,"domainLookupStart":285.89999997615814,"fetchStart":285.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":285.89999997615814,"responseEnd":606.3999999761581,"responseStart":606.3999999761581,"secureConnectionStart":285.89999997615814},{"duration":321.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":286.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":286.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":608,"responseStart":0,"secureConnectionStart":0},{"duration":320.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":286.2999999523163,"connectEnd":286.2999999523163,"connectStart":286.2999999523163,"domainLookupEnd":286.2999999523163,"domainLookupStart":286.2999999523163,"fetchStart":286.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":286.2999999523163,"responseEnd":607,"responseStart":607,"secureConnectionStart":286.2999999523163},{"duration":608.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":299.2000000476837,"connectEnd":299.2000000476837,"connectStart":299.2000000476837,"domainLookupEnd":299.2000000476837,"domainLookupStart":299.2000000476837,"fetchStart":299.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":299.2000000476837,"responseEnd":907.7000000476837,"responseStart":907.7000000476837,"secureConnectionStart":299.2000000476837},{"duration":830.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":309.2000000476837,"connectEnd":309.2000000476837,"connectStart":309.2000000476837,"domainLookupEnd":309.2000000476837,"domainLookupStart":309.2000000476837,"fetchStart":309.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":309.2000000476837,"responseEnd":1139.5,"responseStart":1139.5,"secureConnectionStart":309.2000000476837},{"duration":253.10000002384186,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":792.5,"connectEnd":792.5,"connectStart":792.5,"domainLookupEnd":792.5,"domainLookupStart":792.5,"fetchStart":792.5,"redirectEnd":0,"redirectStart":0,"requestStart":792.5,"responseEnd":1045.6000000238419,"responseStart":1045.6000000238419,"secureConnectionStart":792.5},{"duration":196.30000007152557,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":968.3999999761581,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":968.3999999761581,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1164.7000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":92,"responseStart":280,"responseEnd":310,"domLoading":283,"domInteractive":1201,"domContentLoadedEventStart":1201,"domContentLoadedEventEnd":1256,"domComplete":1388,"loadEventStart":1388,"loadEventEnd":1388,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1166.3999999761581},{"name":"bigPipe.sidebar-id.end","time":1167.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1167.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1172},{"name":"activityTabFullyLoaded","time":1272.8999999761581}],"measures":[],"correlationId":"9bc77b9b90ff2e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Summarizing the report data:
DOUBLE_PREC_HB
"filtered": 3.846199989,
"r_filtered": 0,
JSON
"filtered": 93,
"r_filtered": 0,
If I try to remove the COMPRESSED attribute, I get this:
DOUBLE_PREC_HB
"filtered": 92.96875,
"r_filtered": 0,
JSON_HB
"filtered": 93,
"r_filtered": 0,
DOUBLE_PREC_HB becomes just as bad as JSON_HB. It looks like the good estimate in the original report has been an accident.