回复: 回复: Why is creating indexes faster after inserting massive data rows?

2012-05-09 Thread Zhangzhigang
>The “output” from the sortmerge is fed into code that builds the BTree for the table.  This building of the BTree is sequential – fill the first block, move on to the next block, and never have to go back.  James... Thanks for your answer, so clearly. Firstly: I thought that the "block spli

RE: 回复: Why is creating indexes faster after inserting massive data rows?

2012-05-09 Thread Claudio Nanni
Disagree all the way, numbers are numbers, and better than words, always. Claudio On May 9, 2012 7:22 PM, "Rick James" wrote: > Numbers can be misleading �C one benchmark will show no difference; another > will show 10x difference. > > Recommend you benchmark _*your*_ case. > > ** ** > >

Re: 回复: Why is creating indexes faster after inserting massive data rows?

2012-05-09 Thread Claudio Nanni
This thread is going on and on and on and on, does anyone have time to actually measure I/O? Let's make numbers talk. Claudio 2012/5/9 Rick James > A BTree that is small enough to be cached in RAM can be quickly > maintained. Even the “block splits” are not too costly without the I/O. > > A b

RE: 回复: Why is creating indexes faster after inserting massive data rows?

2012-05-09 Thread Rick James
A BTree that is small enough to be cached in RAM can be quickly maintained. Even the “block splits” are not too costly without the I/O. A big file that needs sorting – bigger than can be cached in RAM – is more efficiently done with a dedicated “sort merge” program. A “big” INDEX on a table m

Re: One table gets locked by itself

2012-05-09 Thread Shawn Green
On 5/9/2012 6:17 AM, Johan De Meersman wrote: - Original Message - From: "Claudio Nanni" Yes indeed, but I think we are talking about MySQL level deadlocks, that can happen only with row level locking and transactions. If the deadlock is generated at application level then you can ha

Re: One table gets locked by itself

2012-05-09 Thread Johan De Meersman
- Original Message - > From: "Claudio Nanni" > Yes indeed, > but I think we are talking about MySQL level deadlocks, > that can happen only with row level locking and transactions. > If the deadlock is generated at application level then you can have > it on anything, also blackhole :-)

Re: One table gets locked by itself

2012-05-09 Thread Claudio Nanni
Yes indeed, but I think we are talking about MySQL level deadlocks, that can happen only with row level locking and transactions. If the deadlock is generated at application level then you can have it on anything, also blackhole :-) Claudio 2012/5/9 Johan De Meersman > - Original Message --

Re: One table gets locked by itself

2012-05-09 Thread Johan De Meersman
- Original Message - > From: "nixofortune" > > Few more things. You can't have a deadlock on Mylsam table. You can You *can* have deadlocks in MyISAM; the concept is not related to any specific engine - or even databases. What you can't have, is deadlock on a single table :-) -- Bier