資源描述:
《myisam引擎和heap引擎執(zhí)行速度的性能測試--》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、MyISAM引擎和Heap引擎執(zhí)行速度的性能測試>> MyISAM引擎和Heap引擎執(zhí)行速度的性能測試: 測試環(huán)境: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; 插入數(shù)據(jù): 說明:每次都是空表插入數(shù)據(jù)[插入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 查詢數(shù)據(jù): 表里分表有:200000條記錄,兩個表數(shù)據(jù)一致[直接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