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
3b1dd15e
Commit
3b1dd15e
authored
Aug 04, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made sure that the test case for bug 28404 use the correct statistics.
parent
4acba86e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
mysql-test/r/order_by.result
mysql-test/r/order_by.result
+9
-5
mysql-test/t/order_by.test
mysql-test/t/order_by.test
+6
-3
No files found.
mysql-test/r/order_by.result
View file @
3b1dd15e
...
...
@@ -1090,21 +1090,25 @@ INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
UPDATE t1 SET c2=20 WHERE id%100 = 0;
SELECT COUNT(*) FROM t1;
COUNT(*)
40960
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
EXPLAIN SELECT id,c3 FROM t1 WHERE c2=11 ORDER BY c3 LIMIT 20;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index k2 k3 5 NULL 88 Using where
EXPLAIN SELECT id,c3 FROM t1 WHERE c2=11 ORDER BY c3 LIMIT
1
00;
EXPLAIN SELECT id,c3 FROM t1 WHERE c2=11 ORDER BY c3 LIMIT
40
00;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref k2 k2 5 const 9300 Using where; Using filesort
EXPLAIN SELECT id,c3 FROM t1 WHERE c2 BETWEEN 10 AND 12 ORDER BY c3 LIMIT
10
0;
EXPLAIN SELECT id,c3 FROM t1 WHERE c2 BETWEEN 10 AND 12 ORDER BY c3 LIMIT
2
0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index k2 k3 5 NULL
316
Using where
EXPLAIN SELECT id,c3 FROM t1 WHERE c2 BETWEEN
10 AND 12 ORDER BY c3 LIMIT 2
000;
1 SIMPLE t1 index k2 k3 5 NULL
63
Using where
EXPLAIN SELECT id,c3 FROM t1 WHERE c2 BETWEEN
20 AND 30 ORDER BY c3 LIMIT 4
000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range k2 k2 5 NULL
12937
Using where; Using filesort
1 SIMPLE t1 range k2 k2 5 NULL
349
Using where; Using filesort
SELECT id,c3 FROM t1 WHERE c2=11 ORDER BY c3 LIMIT 20;
id c3
6 14
...
...
mysql-test/t/order_by.test
View file @
3b1dd15e
...
...
@@ -765,13 +765,16 @@ INSERT INTO t1 (c2,c3) SELECT c2,c3 FROM t1;
INSERT
INTO
t1
(
c2
,
c3
)
SELECT
c2
,
c3
FROM
t1
;
INSERT
INTO
t1
(
c2
,
c3
)
SELECT
c2
,
c3
FROM
t1
;
INSERT
INTO
t1
(
c2
,
c3
)
SELECT
c2
,
c3
FROM
t1
;
UPDATE
t1
SET
c2
=
20
WHERE
id
%
100
=
0
;
SELECT
COUNT
(
*
)
FROM
t1
;
ANALYZE
TABLE
t1
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
1
00
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
BETWEEN
10
AND
12
ORDER
BY
c3
LIMIT
10
0
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
BETWEEN
10
AND
12
ORDER
BY
c3
LIMIT
2
000
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
40
00
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
BETWEEN
10
AND
12
ORDER
BY
c3
LIMIT
2
0
;
EXPLAIN
SELECT
id
,
c3
FROM
t1
WHERE
c2
BETWEEN
20
AND
30
ORDER
BY
c3
LIMIT
4
000
;
SELECT
id
,
c3
FROM
t1
WHERE
c2
=
11
ORDER
BY
c3
LIMIT
20
;
...
...
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