Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `test` (
- `status` tinyint(4) NOT NULL,
- `type` varchar(32) CHARACTER SET ascii NOT NULL COMMENT 'The ID of the target entity.',
- `created` int(11) NOT NULL,
- `title` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
- KEY `status` (`status`,`type`,`created`,`title`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8
- EXPLAIN
- SELECT *
- FROM test
- WHERE status = 1 AND type = 'discussion'
- ORDER BY created DESC, title ASC
- LIMIT 10 OFFSET 0G
- select_type: SIMPLE
- table: test
- partitions: NULL
- type: ref
- possible_keys: status
- key: status
- key_len: 35
- ref: const,const
- rows: 1716
- filtered: 100.00
- Extra: Using where; Using index; Using filesort
- 1 row in set, 1 warning (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement