In the code their is create statement of the table. And i am looking for a way to partition the table and so to speed up te table.
Each week i insert 25000 rows in this table each year. And it is becoming a bit slow to insert new data. And to run queries.
Can any one help me to speed up the query.
the code:
CREATE TABLE `tbldebart12a` (
`debartid` int(11) NOT NULL AUTO_INCREMENT,
`AID` int(10) DEFAULT '0',
`deid` int(10) DEFAULT '0',
`debart_af` decimal(10,6) DEFAULT '0.000000',
`debart_week` int(10) DEFAULT '0',
`debart_jaar` int(10) DEFAULT '0',
`debart_o0` decimal(10,6) DEFAULT '0.000000',
`debart_of` decimal(10,6) DEFAULT '0.000000',
PRIMARY KEY (`debartid`),
KEY `debkey12` (`deid`),
KEY `artkey12` (`AID`),
CONSTRAINT `artkey12` FOREIGN KEY (`AID`) REFERENCES `tblart` (`aid`) ON DELETE SET NULL ON UPDATE SET NULL,
CONSTRAINT `debkey12` FOREIGN KEY (`deid`) REFERENCES `tblghdeb` (`debid`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=1009537 DEFAULT CHARSET=latin1
Each week i insert 25000 rows in this table each year. And it is becoming a bit slow to insert new data. And to run queries.
Can any one help me to speed up the query.
the code:
CREATE TABLE `tbldebart12a` (
`debartid` int(11) NOT NULL AUTO_INCREMENT,
`AID` int(10) DEFAULT '0',
`deid` int(10) DEFAULT '0',
`debart_af` decimal(10,6) DEFAULT '0.000000',
`debart_week` int(10) DEFAULT '0',
`debart_jaar` int(10) DEFAULT '0',
`debart_o0` decimal(10,6) DEFAULT '0.000000',
`debart_of` decimal(10,6) DEFAULT '0.000000',
PRIMARY KEY (`debartid`),
KEY `debkey12` (`deid`),
KEY `artkey12` (`AID`),
CONSTRAINT `artkey12` FOREIGN KEY (`AID`) REFERENCES `tblart` (`aid`) ON DELETE SET NULL ON UPDATE SET NULL,
CONSTRAINT `debkey12` FOREIGN KEY (`deid`) REFERENCES `tblghdeb` (`debid`) ON DELETE SET NULL ON UPDATE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=1009537 DEFAULT CHARSET=latin1