欢迎来到天天文库
浏览记录
ID:22376617
大小:77.50 KB
页数:10页
时间:2018-10-28
《myisam引擎和heap引擎执行速度的性能测试--》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、MyISAM引擎和Heap引擎执行速度的性能测试>> MyISAM引擎和Heap引擎执行速度的性能测试: 测试环境:CPU: IntelPentium42.66GHzMemory:1GBDisk: 73GB/SCSIOS: FreeBSD4.11PHP:PHP5.2.1MySQL:MySQL4.1.23b 前期工作: my.f:max_heap_table_size=128M 建表:usetest;----Storeengineheap--CREATETABLE`tbl_heap`( `id`int(11)NOTNULLauto_incremen
2、t, `name`varchar(32)NOTNULLdefault´´, `email`varchar(32)NOTNULLdefault´´, `summary`varchar(255)default´´, KEY`id`(`id`) )ENGINE=HEAPDEFAULTCHARSET=gbk;----Storeenginemyisam--CREATETABLE`tbl_isam`( `id`int(11)NOTNULLauto_increment, `name`varch
3、ar(32)NOTNULLdefault´´, `email`varchar(32)NOTNULLdefault´´, `summary`varchar(255)default´´, KEY`id`(`id`) )ENGINE=MyISAMDEFAULTCHARSET=gbk; 插入数据: 说明:每次都是空表插入数据[插入10000Record]Heapengineinsert10000recordusedtime:3.5008587837219MyISAMengineinsert1
4、0000recordusedtime:4.5881390571594[50000Record]Heapengineinsert50000recordusedtime:19.895354986191MyISAMengineinsert50000recordusedtime:33.866044998169[100000Record]Heapengineinsert100000recordusedtime:36.200875997543MyISAMengineinsert100000recordusedtime:68.34194111824[200000Record]
5、Heapengineinsert200000recordusedtime:68.00207901001MyISAMengineinsert200000recordusedtime:125.26263713837 查询数据: 表里分表有:200000条记录,两个表数据一致[直接select,10000次,每次取100条记录]Heapengineselect10000times,100recordusedtime:12.122506141663MyISAMengineselect10000times,100recordusedtime:19.5128960609
6、44[直接select,1000次,每次取10000条记录]Heapengineselect1000times,10000recordusedtime:111.54126811028MyISAMengineselect1000recordusedtime:116.79438710213[增加es,10000recordusedtime:111.52102303505MyISAMengineselect1000times,10000recordusedtime:117.68481087685[es,1000recordusedtime:124.2898869514
7、5MyISAMengineselect10000times,1000recordusedtime:139.82107305527[es,1000recordusedtime:145.43780493736MyISAMengineselect10000times,1000recordusedtime:163.56296992302[e(name);ALTERTABLEtbl_isamADDINDEXidx_name(name);Heapenginealtertableaddindexusedtime:2.078MyI123下一页>>>>这篇文章来自..,。SAMe
8、nginealterta
此文档下载收益归作者所有