i have innodb tables (all of them are in the same file, and this file became very large, about 8GB) when i insert a row in one this table (this table contains about 1 million record), this insert statement takes about 30 seconds !!! is there anyway to improve this issue?? any idea is highly appreciated
CREATE TABLE userdata ( userno blob NOT NULL, amount double(11,2), active enum('0','1') default '0', used enum('0','1') default '0', ActionTime timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, Bonus enum('0','1') default '0', UserType enum('Perm','Temp') NOT NULL default 'Perm', serial_number bigint(20) NOT NULL default '0', PRIMARY KEY (userno(50)), KEY AIX (active), KEY UIX (used), KEY Id (userno(20),active), KEY UI (userno(50)), KEY SNI (serial_number) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE mytableand post its output.usernoblob NOT NULL,amountdouble(11,2),activeenum('0','1') default '0',usedenum('0','1') default '0',ActionTimetimestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,Bonusenum('0','1') default '0',UserTypeenum('Perm','Temp') NOT NULL default 'Perm',serial_numberbigint(20) NOT NULL default '0', PRIMARY KEY (userno(50)), KEYAIX(active), KEYUIX(used), KEYId(userno(20),active), KEYUI(userno(50)), KEYSNI(serial_number) ) ENGINE=InnoDB DEFAULT CHARSET=latin1