MySQL Forums
Forum List  »  InnoDB

Re: Index exist on Deleted columns
Posted by: Peter Brawley
Date: September 20, 2017 10:19AM

If I'm reading your post correctly, innodb_buffer_pool_size is 23G in 8 GB of RAM. Yikes. When the buffer_pool is a quarter or so full, MySQL will be swapping to disk. Terrible. Swapping must be avoided. With 8GB RAM and no other software running, innonb_buffer_pool_size should be no more than 6GB.

There's probably a serious reason for that 23GB setting. Let's see the result of ...

select  
  concat(round(sum(table_rows)/1000000,2),'m') rows, 
  concat(round(sum(data_length)/(1024*1024*1024),2),'g') data, 
  concat(round(sum(index_length)/(1024*1024*1024),2),'g') idx, 
  concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'g') total_size, 
  round(sum(index_length)/sum(data_length),2) idxfrac 
from information_schema.tables ;

show variables;
show global status;

The deletion cmd you posted would delete all rows. Much faster to truncate the table. Assuming the real query has a condition, best approach usually is to delete in chunks, see http://mysql.rjweb.org/doc.php/deletebig .

Options: ReplyQuote


Subject
Views
Written By
Posted
2675
September 19, 2017 09:38AM
899
September 19, 2017 01:36PM
1022
September 20, 2017 12:54AM
Re: Index exist on Deleted columns
958
September 20, 2017 10:19AM
1008
September 21, 2017 04:21AM
893
September 21, 2017 09:27AM
914
September 22, 2017 05:12AM
1095
September 22, 2017 09:04AM
938
September 24, 2017 07:14AM
848
September 24, 2017 11:13AM
878
September 24, 2017 09:29PM
830
September 24, 2017 09:55PM
902
September 25, 2017 12:25AM
928
September 25, 2017 11:03AM
963
September 26, 2017 05:30AM
906
September 26, 2017 12:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.