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
8978675b
Commit
8978675b
authored
May 23, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#1000051: Query with simple join and ORDER BY takes thousands times longer when run with ICP
- Correct testcases.
parent
1d3ba8a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
mysql-test/r/myisam_icp.result
mysql-test/r/myisam_icp.result
+8
-6
mysql-test/t/myisam_icp.test
mysql-test/t/myisam_icp.test
+6
-3
No files found.
mysql-test/r/myisam_icp.result
View file @
8978675b
...
@@ -915,15 +915,17 @@ DROP TABLE t1,t2,t3,t4;
...
@@ -915,15 +915,17 @@ DROP TABLE t1,t2,t3,t4;
create table t0 (a int);
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, col int, filler char(100), key(a, col));
create table t1 (a int, col int, filler char(100), key(a, col));
insert into t1 select A.a + 10*B.a +100*C.a, 1234, 'filler' from t0 A, t0 B, t0 C;
insert into t1 select A.a + 10*B.a, 1234, 'filler' from t0 A, t0 B, t0 C;
set @tmp_10000051= @@optimizer_switch;
set optimizer_switch='mrr=off';
# Must not use ICP:
# Must not use ICP:
explain select * from t1 where a between
10 and 20 order by a
, col desc;
explain select * from t1 where a between
5 and 8 order by a desc
, col desc;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range a a 5 NULL 11 Using index condition; Rowid-ordered scan; Using filesort
1 SIMPLE t1 range a a 5 NULL 39 Using where
set optimizer_switch= @tmp_10000051;
# Must not use ICP:
# Must not use ICP:
explain select * from t
0,t1 where t1.a=t0.a and t1.col<123
;
explain select * from t
1 where a=3 and col > 500 order by a desc, col desc
;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where
1 SIMPLE t1 range a a 10 NULL 10 Using where
1 SIMPLE t1 ref a a 5 test.t0.a 1 Using index condition
drop table t0, t1;
drop table t0, t1;
set optimizer_switch=@myisam_icp_tmp;
set optimizer_switch=@myisam_icp_tmp;
mysql-test/t/myisam_icp.test
View file @
8978675b
...
@@ -269,13 +269,16 @@ create table t0 (a int);
...
@@ -269,13 +269,16 @@ create table t0 (a int);
insert
into
t0
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
insert
into
t0
values
(
0
),(
1
),(
2
),(
3
),(
4
),(
5
),(
6
),(
7
),(
8
),(
9
);
create
table
t1
(
a
int
,
col
int
,
filler
char
(
100
),
key
(
a
,
col
));
create
table
t1
(
a
int
,
col
int
,
filler
char
(
100
),
key
(
a
,
col
));
insert
into
t1
select
A
.
a
+
10
*
B
.
a
+
100
*
C
.
a
,
1234
,
'filler'
from
t0
A
,
t0
B
,
t0
C
;
insert
into
t1
select
A
.
a
+
10
*
B
.
a
,
1234
,
'filler'
from
t0
A
,
t0
B
,
t0
C
;
set
@
tmp_10000051
=
@@
optimizer_switch
;
set
optimizer_switch
=
'mrr=off'
;
--
echo
# Must not use ICP:
--
echo
# Must not use ICP:
explain
select
*
from
t1
where
a
between
10
and
20
order
by
a
,
col
desc
;
explain
select
*
from
t1
where
a
between
5
and
8
order
by
a
desc
,
col
desc
;
set
optimizer_switch
=
@
tmp_10000051
;
--
echo
# Must not use ICP:
--
echo
# Must not use ICP:
explain
select
*
from
t
0
,
t1
where
t1
.
a
=
t0
.
a
and
t1
.
col
<
123
;
explain
select
*
from
t
1
where
a
=
3
and
col
>
500
order
by
a
desc
,
col
desc
;
drop
table
t0
,
t1
;
drop
table
t0
,
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