Navigation Menu

Skip to content

Commit

Permalink
test: force use index
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Nov 17, 2012
1 parent 3b347c3 commit e228ce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -5,12 +5,12 @@ id CHAR(6) CHARACTER SET LATIN1 PRIMARY KEY
INSERT INTO ids VALUES("abcdef");
INSERT INTO ids VALUES( "cdef");
INSERT INTO ids VALUES( "ef");
SELECT * FROM ids ORDER BY id;
SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id;
id
abcdef
cdef
ef
SELECT * FROM ids WHERE id = "cdef";
SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "cdef";
id
cdef
DROP TABLE ids;
Expand Up @@ -28,9 +28,9 @@ INSERT INTO ids VALUES("abcdef");
INSERT INTO ids VALUES( "cdef");
INSERT INTO ids VALUES( "ef");

SELECT * FROM ids ORDER BY id;
SELECT * FROM ids FORCE INDEX(PRIMARY) ORDER BY id;

SELECT * FROM ids WHERE id = "cdef";
SELECT * FROM ids FORCE INDEX(PRIMARY) WHERE id = "cdef";

DROP TABLE ids;

Expand Down

0 comments on commit e228ce3

Please sign in to comment.