2014-01-24 53 views
0

我試圖對其中包含2億條記錄的表進行分區。並且它會拋出異常,因爲鎖的總數超過了鎖表大小。做了這些改變後即使在增加緩衝池大小之後,鎖的總數也超過了鎖表大小

# PER CLIENT SETTINGS # 
# bit high but I got tons of ram here # 
sort_buffer_size    = 2M 
read_buffer_size    = 2M 
binlog_cache_size    = 1M 
wait_timeout     = 31536000 
interactive_timeout    = 300 
max_allowed_packet    = 12M 
thread_stack     = 128K 
table_cache      = 1024 
myisam_sort_buffer_size   = 1M 
tmp_table_size     = 12M 
max_heap_table_size    = 12M 


# LOGGING # 
log_queries_not_using_indexes = 1 
slow_query_log     = 1 
slow_query_log_file   = /var/lib/mysql/slowquery.log 

# MyISAM # 
key_buffer_size    = 32M 
myisam_recover     = FORCE,BACKUP 

# SAFETY # 
max_allowed_packet    = 16M 
max_connect_errors    = 1000000 


# BINARY LOGGING # 
log_bin      = /var/lib/mysql/mysql-bin 
expire_logs_days    = 14 
sync_binlog     = 1 

# CACHES AND LIMITS # 
tmp-table-size     = 32M 
max-heap-table-size   = 32M 
query-cache-type    = 0 
query-cache-size    = 0 
max-connections    = 500 
thread-cache-size    = 50 
open-files-limit    = 65535 
table-definition-cache   = 1024 
table-open-cache    = 2048 

# INNODB # 
innodb-flush-method   = O_DIRECT 
innodb-log-files-in-group  = 2 
innodb-log-file-size   = 512M 
innodb-flush-log-at-trx-commit = 1 
innodb-file-per-table   = 1 
innodb-buffer-pool-size  = 40G 

我已經重新啓動mysql的:我讀了一些建議在線和改變的my.cnf file.Here是配置。它仍然拋出異常。我的服務器有12個內核和48GB Ram,我可以暫時將此服務器專用於此分區過程。有沒有任何建議可以繞過這個異常(超過總鎖數)?

+1

投票將此問題移至dba.stackexchange.com –

回答