Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d3e511d4
Commit
d3e511d4
authored
Jan 08, 2022
by
Sergei Petrunia
Committed by
Sergei Petrunia
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-27243: Estimation for filtered rows less precise ... #7
Added a testcase
parent
531dd708
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
mysql-test/main/statistics_json.result
mysql-test/main/statistics_json.result
+14
-0
mysql-test/main/statistics_json.test
mysql-test/main/statistics_json.test
+13
-0
No files found.
mysql-test/main/statistics_json.result
View file @
d3e511d4
...
...
@@ -8241,3 +8241,17 @@ analyze select COUNT(*) FROM t1 WHERE a <='bar';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 200 200.00 50.00 50.00 Using where
drop table t1;
#
# MDEV-27243: Estimation for filtered rows less precise ... #7
# (Testcase only)
CREATE TABLE t1 (f TIME);
INSERT INTO t1 SELECT IF(seq%2,'00:00:00',SEC_TO_TIME(seq+7200)) FROM seq_1_to_1000;
SET histogram_type= JSON_HB;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
ANALYZE SELECT * FROM t1 WHERE f > '00:01:00';
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 1000 1000.00 50.00 50.00 Using where
drop table t1;
mysql-test/main/statistics_json.test
View file @
d3e511d4
...
...
@@ -416,3 +416,16 @@ analyze select COUNT(*) FROM t1 WHERE a >='bar';
analyze
select
COUNT
(
*
)
FROM
t1
WHERE
a
<=
'bar'
;
drop
table
t1
;
--
echo
#
--
echo
# MDEV-27243: Estimation for filtered rows less precise ... #7
--
echo
# (Testcase only)
CREATE
TABLE
t1
(
f
TIME
);
INSERT
INTO
t1
SELECT
IF
(
seq
%
2
,
'00:00:00'
,
SEC_TO_TIME
(
seq
+
7200
))
FROM
seq_1_to_1000
;
SET
histogram_type
=
JSON_HB
;
ANALYZE
TABLE
t1
PERSISTENT
FOR
ALL
;
ANALYZE
SELECT
*
FROM
t1
WHERE
f
>
'00:01:00'
;
drop
table
t1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment