Skip to content

Instantly share code, notes, and snippets.

@spaze
Last active Jul 21, 2017
Embed
What would you like to do?
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE foo ref code code 34 const 1 100.00 Using index
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE foo index code code 34 12 10.00 "Using where; Using index"
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `foo`;
CREATE TABLE `foo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(32) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `code` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `foo` (`id`, `code`) VALUES
(12, '123'),
(11, '546g876870'),
(6, '7877897wrw'),
(3, '78r97qr'),
(7, '7e8w99w'),
(1, '857545'),
(10, 'b54cv6vc68b7'),
(9, 'v5d5fd5gd'),
(8, 'vv55v55v'),
(4, 'w987w987'),
(2, 'we52wer5'),
(5, 'wrwr78w77');
-- 2017-07-21 11:52:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment