Home >Database >Mysql Tutorial > MySQL5.6优化了Order by排序limit

MySQL5.6优化了Order by排序limit

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 17:36:461206browse

表结构(1000万行记录):mysqlshowcreatetablesbtest\\G;***************************1.row***************************Table:sbtestCreateTable:CREATETABLE`s

表结构(1000万行记录):

mysql> show create table sbtest\G; *************************** 1. row *************************** Table: sbtest Create Table: CREATE TABLE `sbtest` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `k` int(10) unsigned NOT NULL DEFAULT '0', `c` char(120) NOT NULL DEFAULT '', `pad` char(60) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `k` (`k`) ) ENGINE=InnoDB AUTO_INCREMENT=1000001 DEFAULT CHARSET=utf8


我现在对sbtest表非索引字段进行order by排序,,版本是MySQL5.5,耗时时间如下:

wKioL1L7S-2y3iTEAAJSAg1uUBw080.jpg



本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn