Heim >Datenbank >MySQL-Tutorial > MySQL5.6优化了Order by排序limit

MySQL5.6优化了Order by排序limit

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

表结构(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



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

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn