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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a8d2692c
Commit
a8d2692c
authored
Oct 07, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adder order by
parent
4a01f303
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
mysql-test/r/ndb_subquery.result
mysql-test/r/ndb_subquery.result
+4
-4
mysql-test/t/ndb_subquery.test
mysql-test/t/ndb_subquery.test
+4
-4
No files found.
mysql-test/r/ndb_subquery.result
View file @
a8d2692c
...
@@ -10,7 +10,7 @@ explain select * from t2 where p NOT IN (select p from t1);
...
@@ -10,7 +10,7 @@ explain select * from t2 where p NOT IN (select p from t1);
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 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index
2 DEPENDENT SUBQUERY t1 unique_subquery PRIMARY PRIMARY 4 func 1 Using index
select * from t2 where p NOT IN (select p from t1);
select * from t2 where p NOT IN (select p from t1)
order by p
;
p u o
p u o
4 4 4
4 4 4
5 5 5
5 5 5
...
@@ -18,7 +18,7 @@ explain select * from t2 where p NOT IN (select u from t1);
...
@@ -18,7 +18,7 @@ explain select * from t2 where p NOT IN (select u from t1);
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 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func 1 Using index
2 DEPENDENT SUBQUERY t1 unique_subquery u u 4 func 1 Using index
select * from t2 where p NOT IN (select u from t1);
select * from t2 where p NOT IN (select u from t1)
order by p
;
p u o
p u o
4 4 4
4 4 4
5 5 5
5 5 5
...
@@ -26,7 +26,7 @@ explain select * from t2 where p NOT IN (select o from t1);
...
@@ -26,7 +26,7 @@ explain select * from t2 where p NOT IN (select o from t1);
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 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func 1 Using index
2 DEPENDENT SUBQUERY t1 index_subquery o o 4 func 1 Using index
select * from t2 where p NOT IN (select o from t1);
select * from t2 where p NOT IN (select o from t1)
order by p
;
p u o
p u o
4 4 4
4 4 4
5 5 5
5 5 5
...
@@ -34,7 +34,7 @@ explain select * from t2 where p NOT IN (select p+0 from t1);
...
@@ -34,7 +34,7 @@ explain select * from t2 where p NOT IN (select p+0 from t1);
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 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where
select * from t2 where p NOT IN (select p+0 from t1);
select * from t2 where p NOT IN (select p+0 from t1)
order by p
;
p u o
p u o
4 4 4
4 4 4
5 5 5
5 5 5
...
...
mysql-test/t/ndb_subquery.test
View file @
a8d2692c
...
@@ -18,19 +18,19 @@ insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5);
...
@@ -18,19 +18,19 @@ insert into t2 values (1,1,1),(2,2,2),(3,3,3), (4,4,4), (5,5,5);
# Use pk
# Use pk
explain
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
);
explain
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
p
from
t1
)
order
by
p
;
# Use unique index
# Use unique index
explain
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
);
explain
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
u
from
t1
)
order
by
p
;
# Use ordered index
# Use ordered index
explain
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
);
explain
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
o
from
t1
)
order
by
p
;
# Use scan
# Use scan
explain
select
*
from
t2
where
p
NOT
IN
(
select
p
+
0
from
t1
);
explain
select
*
from
t2
where
p
NOT
IN
(
select
p
+
0
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
p
+
0
from
t1
);
select
*
from
t2
where
p
NOT
IN
(
select
p
+
0
from
t1
)
order
by
p
;
drop
table
t1
;
drop
table
t1
;
drop
table
t2
;
drop
table
t2
;
...
...
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