|List:||General Discussion||« Previous MessageNext Message »|
|From:||Zhangzhigang||Date:||May 7 2012 7:53am|
|Subject:||回复： Why is creating indexes faster afte|
r inserting massive data rows?
|View as plain text|
Version : Mysql 5.1 Engine : MyISAM. The indexes are normal but neither primary key or unique key. I should describe mysql question clearly. When inserting massive data rows to table which need to be created indexes, i can create indexes before inserting data rows, anther way is that i can insert all data rows firstly and then create indexes. Normally, the sum using time(inserting data rows and creating indexes) of first way is longer than the second way. Please tell me why? ________________________________ 发件人： Ananda Kumar <anandkl@stripped> 收件人： Zhangzhigang <zzgang_2008@stripped> 抄送： "mysql@stripped" <mysql@stripped> 发送日期： 2012年5月7日, 星期一, 下午 3:31 主题: Re: Why is creating indexes faster after inserting massive data rows? which version of mysql 燼re you using. Is this secondary index.? On Mon, May 7, 2012 at 12:07 PM, Zhangzhigang <zzgang_2008@stripped> wrote: hi all: > >I have a question: > >Creating indexes after inserting massive data rows is faster than before inserting data rows. >Please tell me why. >