From: Zhangzhigang Date: May 7 2012 7:53am Subject: =?utf-8?B?5Zue5aSN77yaIFdoeSBpcyBjcmVhdGluZyBpbmRleGVzIGZhc3RlciBhZnRl?= =?utf-8?B?ciBpbnNlcnRpbmcgbWFzc2l2ZSBkYXRhIHJvd3M/?= List-Archive: http://lists.mysql.com/mysql/227333 Message-Id: <1336377202.82323.YahooMailNeo@web15208.mail.cnb.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="104030145-1900764526-1336377202=:82323" --104030145-1900764526-1336377202=:82323 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Version : Mysql 5.1 =0A=0AEngine : MyISAM.=0A=0AThe indexes=C2=A0 are norma= l but neither primary key or unique key.=0A=0AI should describe mysql quest= ion clearly.=0A=0AWhen inserting massive data rows to table which need to b= e 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. Nor= mally, the sum using time(inserting data rows and creating indexes) of firs= t way is longer than the second way.=0A=0APlease tell me why?=0A=0A=0A=0A= =0A=0A=0A=0A________________________________=0A =0A=E5=8F=91=E4=BB=B6=E4=BA= =BA=EF=BC=9A Ananda Kumar =0A=E6=94=B6=E4=BB=B6=E4=BA=BA= =EF=BC=9A Zhangzhigang =0A=E6=8A=84=E9=80=81=EF= =BC=9A "mysql@stripped" =0A=E5=8F=91=E9=80= =81=E6=97=A5=E6=9C=9F=EF=BC=9A 2012=E5=B9=B45=E6=9C=887=E6=97=A5, =E6=98=9F= =E6=9C=9F=E4=B8=80, =E4=B8=8B=E5=8D=88 3:31=0A=E4=B8=BB=E9=A2=98: Re: Why i= s creating indexes faster after inserting massive data rows?=0A =0A=0Awhich= version of mysql =E7=87=BCre you using.=0A=0AIs this secondary index.?=0A= =0A=0A=0A=0AOn Mon, May 7, 2012 at 12:07 PM, Zhangzhigang wrote:=0A=0Ahi all:=0A>=0A>I have a question:=0A>=0A>Creating ind= exes after inserting massive data rows is faster than before inserting data= rows.=0A>Please tell me why.=0A> --104030145-1900764526-1336377202=:82323--