Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
None
Fix Version/s:
None
Component/s:
None
I am unable to create a double-precision histogram. I know this is weird - it
was mentioned at the optimizer call that double-precision histograms help,
which implies that somebody succeeded in creating them, but I am unable to.
I start the server and client like this, to have a clean environment
./mysql-test-run --start-and-exit
mysql -uroot -A --socket=/data0/psergey/dev2/maria-10.0-mwl253/mysql-test/var/tmp/mysqld.1.sock
Then I run:
MariaDB [(none)]> set histogram_size=10;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> set histogram_type='double_prec_hb';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> show variables like 'histogram%';
+----------------+----------------+
| Variable_name | Value |
+----------------+----------------+
| histogram_size | 10 |
| histogram_type | DOUBLE_PREC_HB |
+----------------+----------------+
2 rows in set (0.00 sec)
MariaDB [(none)]> use test;
Database changed
MariaDB [test]> create table t21 ( a int);
Query OK, 0 rows affected (0.01 sec)
MariaDB [test]> insert into t21 values (1),(2),(3),(4),(5);
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0
MariaDB [test]> analyze table t21 persistent for all;
+----------+---------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+----------+---------+----------+----------+
| test.t21 | analyze | status | OK |
+----------+---------+----------+----------+
1 row in set (0.00 sec)
MariaDB [test]> select *, hex(histogram),length(histogram) from mysql.column_stats where db_name='test' and table_name='t21'\G
*************************** 1. row ***************************
db_name: test
table_name: t21
column_name: a
min_value: 1
max_value: 5
nulls_ratio: 0.0000
avg_length: 4.0000
avg_frequency: 1.0000
hist_size: 10
hist_type: SINGLE_PREC_HB
histogram: �?�����
hex(histogram): 0000FF3FFF7FFFBFFFFF
length(histogram): 10
1 row in set (0.00 sec)
So, I've got a single-precision histogram. Note that hist_type column is set,
unlike in MDEV-4357 .
relates to
MDEV-4145
Take into account the selectivity of single-table range predicates on non-indexed columns when searching for the best execution plan
Closed
{"report":{"fcp":1126.5999999046326,"ttfb":386.89999985694885,"pageVisibility":"visible","entityId":23545,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"4a6e5e2f-a000-4f38-a3f0-cf4946e8bf5b","navigationType":0,"readyForUser":1194.3999998569489,"redirectCount":0,"resourceLoadedEnd":1358,"resourceLoadedStart":392.39999985694885,"resourceTiming":[{"duration":230.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":392.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":392.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":622.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":230.79999995231628,"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":392.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":392.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":623.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":283.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":392.7999999523163,"connectEnd":392.7999999523163,"connectStart":392.7999999523163,"domainLookupEnd":392.7999999523163,"domainLookupStart":392.7999999523163,"fetchStart":392.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":392.7999999523163,"responseEnd":676.2000000476837,"responseStart":676.0999999046326,"secureConnectionStart":392.7999999523163},{"duration":352.60000014305115,"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":393.09999990463257,"connectEnd":393.09999990463257,"connectStart":393.09999990463257,"domainLookupEnd":393.09999990463257,"domainLookupStart":393.09999990463257,"fetchStart":393.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":393.09999990463257,"responseEnd":745.7000000476837,"responseStart":745.7000000476837,"secureConnectionStart":393.09999990463257},{"duration":356,"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":393.2999999523163,"connectEnd":393.2999999523163,"connectStart":393.2999999523163,"domainLookupEnd":393.2999999523163,"domainLookupStart":393.2999999523163,"fetchStart":393.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":393.2999999523163,"responseEnd":749.2999999523163,"responseStart":749.2999999523163,"secureConnectionStart":393.2999999523163},{"duration":356.2000000476837,"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":393.5,"connectEnd":393.5,"connectStart":393.5,"domainLookupEnd":393.5,"domainLookupStart":393.5,"fetchStart":393.5,"redirectEnd":0,"redirectStart":0,"requestStart":393.5,"responseEnd":749.7000000476837,"responseStart":749.7000000476837,"secureConnectionStart":393.5},{"duration":356.5,"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":393.59999990463257,"connectEnd":393.59999990463257,"connectStart":393.59999990463257,"domainLookupEnd":393.59999990463257,"domainLookupStart":393.59999990463257,"fetchStart":393.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":393.59999990463257,"responseEnd":750.0999999046326,"responseStart":750.0999999046326,"secureConnectionStart":393.59999990463257},{"duration":423.09999990463257,"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":393.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":393.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":816.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":356.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":394,"connectEnd":394,"connectStart":394,"domainLookupEnd":394,"domainLookupStart":394,"fetchStart":394,"redirectEnd":0,"redirectStart":0,"requestStart":394,"responseEnd":750.5,"responseStart":750.5,"secureConnectionStart":394},{"duration":422.90000009536743,"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":394.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":394.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":817,"responseStart":0,"secureConnectionStart":0},{"duration":356.7999999523163,"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":394.2999999523163,"connectEnd":394.2999999523163,"connectStart":394.2999999523163,"domainLookupEnd":394.2999999523163,"domainLookupStart":394.2999999523163,"fetchStart":394.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":394.2999999523163,"responseEnd":751.0999999046326,"responseStart":751.0999999046326,"secureConnectionStart":394.2999999523163},{"duration":662.5,"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":395.09999990463257,"connectEnd":395.09999990463257,"connectStart":395.09999990463257,"domainLookupEnd":395.09999990463257,"domainLookupStart":395.09999990463257,"fetchStart":395.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":395.09999990463257,"responseEnd":1057.5999999046326,"responseStart":1057.5999999046326,"secureConnectionStart":395.09999990463257},{"duration":949.3999998569489,"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":395.2000000476837,"connectEnd":395.2000000476837,"connectStart":395.2000000476837,"domainLookupEnd":395.2000000476837,"domainLookupStart":395.2000000476837,"fetchStart":395.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":395.2000000476837,"responseEnd":1344.5999999046326,"responseStart":1344.5999999046326,"secureConnectionStart":395.2000000476837},{"duration":240.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":828.2000000476837,"connectEnd":828.2000000476837,"connectStart":828.2000000476837,"domainLookupEnd":828.2000000476837,"domainLookupStart":828.2000000476837,"fetchStart":828.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":828.2000000476837,"responseEnd":1068.3999998569489,"responseStart":1068.3999998569489,"secureConnectionStart":828.2000000476837},{"duration":273.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1082.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1082.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1356,"responseStart":0,"secureConnectionStart":0},{"duration":267.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1083.7999999523163,"connectEnd":1083.7999999523163,"connectStart":1083.7999999523163,"domainLookupEnd":1083.7999999523163,"domainLookupStart":1083.7999999523163,"fetchStart":1083.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1083.7999999523163,"responseEnd":1351.0999999046326,"responseStart":1351.0999999046326,"secureConnectionStart":1083.7999999523163},{"duration":273.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1084.0999999046326,"connectEnd":1084.0999999046326,"connectStart":1084.0999999046326,"domainLookupEnd":1084.0999999046326,"domainLookupStart":1084.0999999046326,"fetchStart":1084.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1084.0999999046326,"responseEnd":1358,"responseStart":1358,"secureConnectionStart":1084.0999999046326},{"duration":285.60000014305115,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1120.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1120.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1406.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":220,"responseStart":387,"responseEnd":389,"domLoading":390,"domInteractive":1365,"domContentLoadedEventStart":1365,"domContentLoadedEventEnd":1403,"domComplete":1476,"loadEventStart":1476,"loadEventEnd":1477,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1346.2999999523163},{"name":"bigPipe.sidebar-id.end","time":1347.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1347.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1348.0999999046326},{"name":"activityTabFullyLoaded","time":1451.5}],"measures":[],"correlationId":"461279499705fa","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":102,"dbReadsTimeInMs":17,"dbConnsTimeInMs":28,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
A fix for the bug has been pushed into maria-10.0-mwl253.