Forum Stats

  • 3,854,252 Users
  • 2,264,344 Discussions
  • 7,905,622 Comments

Discussions

Error occurred during enable key in a large table in MySQL

user11995089
user11995089 Member Posts: 3 Blue Ribbon
edited Jun 13, 2016 8:35AM in MySQL Community Space

I am getting the error -

[BatchRunner] 14:55:00.763 [pool-2-thread-1] ERROR c.n.d.m.d.r.NthDayMapRepository - Error occured while enabling keys

java.sql.SQLException: Table './durga_qa1/maf_module_detail_snapshot_3' is marked as crashed and last (automatic?) repair failed

After doing the following operations

  1. Disable key for the target table name say maf_module_detail_snapshot_1
  2. Set following session variables :

        BULK_INSERT_BUFFER_SIZE=16777216

        READ_BUFFER_SIZE=131072

        READ_RND_BUFFER_SIZE=1048576

       TMP_TABLE_SIZE=33554432

        MAX_HEAP_TABLE_SIZE=33554432

  1. Load data in table using sql loader
  2. Enable keys of the target table.

Answers