High Overhead On Active Insert And Delete Table

High Overhead On Active Insert And Delete Table

am 03.01.2010 11:52:08 von uYe

Hi list,
I have a table which is very active in operation INSERT INTO and
DELETE, approximately there will be around 2millions INSERT and DELETE
operation per day. And I see the overhead is getting very high, I must
do OPTIMIZE TABLE query every time. Is there any other option to solve
this? TIA.



Willy
sangprabv@gmail.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: High Overhead On Active Insert And Delete Table

am 03.01.2010 12:00:20 von sureshkumarilu

SGkgV2lsbHksDQpXaGF0IGlzIHRoZSBlbmdpbmUgeW91IGFyZSB1c2luZyBm b3IgdGhlIHRhYmxl
PyBQYXN0ZSB0aGUgdGFibGUgc3RydWN0dXJlLg0KVGhhbmtzLA0KU3VyZXNo IEt1bmENCi0tLS0t
LU9yaWdpbmFsIE1lc3NhZ2UtLS0tLS0NCkZyb206IFdpbGx5IE11bGFydG8N ClRvOiBteXNxbEBs
aXN0cy5teXNxbC5jb20NClN1YmplY3Q6IEhpZ2ggT3ZlcmhlYWQgT24gQWN0 aXZlIEluc2VydCBB
bmQgRGVsZXRlIFRhYmxlDQpTZW50OiBKYW4gMywgMjAxMCA0OjIyIFBNDQoN CkhpIGxpc3QsDQpJ
IGhhdmUgYSB0YWJsZSB3aGljaCBpcyB2ZXJ5IGFjdGl2ZSBpbiBvcGVyYXRp b24gSU5TRVJUIElO
VE8gYW5kICANCkRFTEVURSwgYXBwcm94aW1hdGVseSB0aGVyZSB3aWxsIGJl IGFyb3VuZCAybWls
bGlvbnMgSU5TRVJUIGFuZCBERUxFVEUgIA0Kb3BlcmF0aW9uIHBlciBkYXku IEFuZCBJIHNlZSB0
aGUgb3ZlcmhlYWQgaXMgZ2V0dGluZyB2ZXJ5IGhpZ2gsIEkgbXVzdCAgDQpk byBPUFRJTUlaRSBU
QUJMRSBxdWVyeSBldmVyeSB0aW1lLiBJcyB0aGVyZSBhbnkgb3RoZXIgb3B0 aW9uIHRvIHNvbHZl
ICANCnRoaXM/IFRJQS4NCg0KDQoNCldpbGx5DQpzYW5ncHJhYnZAZ21haWwu Y29tDQoNCg0KDQoN
Ci0tIA0KTXlTUUwgR2VuZXJhbCBNYWlsaW5nIExpc3QNCkZvciBsaXN0IGFy Y2hpdmVzOiBodHRw
Oi8vbGlzdHMubXlzcWwuY29tL215c3FsDQpUbyB1bnN1YnNjcmliZTogICAg aHR0cDovL2xpc3Rz
Lm15c3FsLmNvbS9teXNxbD91bnN1Yj1zdXJlc2hrdW1hcmlsdUBnbWFpbC5j b20NCg0KDQoNClNl
bnQgZnJvbSBCbGFja0JlcnJ5riBvbiBBaXJ0ZWw=

Re: High Overhead On Active Insert And Delete Table

am 03.01.2010 12:12:08 von uYe

The engine is using MyISAM. And here is the structure:
CREATE TABLE IF NOT EXISTS `ie_push` (
`sql_id` bigint(20) NOT NULL auto_increment,
`momt` enum('MO','MT','DLR') default NULL,
`sender` varchar(20) default NULL,
`receiver` varchar(20) default NULL,
`udhdata` blob,
`msgdata` text,
`time` bigint(20) default NULL,
`smsc_id` varchar(255) default NULL,
`service` varchar(255) default NULL,
`account` varchar(255) default NULL,
`id` bigint(20) default NULL,
`sms_type` bigint(20) default NULL,
`mclass` bigint(20) default NULL,
`mwi` bigint(20) default NULL,
`coding` bigint(20) default NULL,
`compress` bigint(20) default NULL,
`validity` bigint(20) default NULL,
`deferred` bigint(20) default NULL,
`dlr_mask` bigint(20) default NULL,
`dlr_url` varchar(255) default NULL,
`pid` bigint(20) default NULL,
`alt_dcs` bigint(20) default NULL,
`rpi` bigint(20) default NULL,
`charset` varchar(255) default NULL,
`boxc_id` varchar(255) default NULL,
`binfo` varchar(255) default NULL,
`priority` tinyint(4) default NULL,
`custom` varchar(255) default NULL,
`additional` varchar(255) default NULL,
`service_id` varchar(50) default NULL,
`fid` varchar(50) default NULL,
`msgid` varchar(50) default NULL,
`insertdate` datetime default NULL,
PRIMARY KEY (`sql_id`),
KEY `momt` (`momt`),
KEY `sender` (`sender`),
KEY `receiver` (`receiver`),
KEY `time` (`time`),
KEY `service` (`service`),
KEY `account` (`account`),
KEY `id` (`id`),
KEY `sms_type` (`sms_type`),
KEY `mclass` (`mclass`),
KEY `mwi` (`mwi`),
KEY `coding` (`coding`),
KEY `compress` (`compress`),
KEY `validity` (`validity`),
KEY `deferred` (`deferred`),
KEY `dlr_mask` (`dlr_mask`),
KEY `dlr_url` (`dlr_url`),
KEY `pid` (`pid`),
KEY `rpi` (`rpi`),
KEY `alt_dcs` (`alt_dcs`),
KEY `charset` (`charset`),
KEY `boxc_id` (`boxc_id`),
KEY `binfo` (`binfo`),
KEY `priority` (`priority`),
KEY `custom` (`custom`),
KEY `additional` (`additional`),
KEY `service_id` (`service_id`),
KEY `insertdate` (`insertdate`),
KEY `fid` (`fid`),
KEY `msgid` (`msgid`)
) ENGINE=3DMyISAM DEFAULT CHARSET=3Dlatin1;




Willy
sangprabv@gmail.com



On Jan 3, 2010, at 6:00 PM, sureshkumarilu@gmail.com wrote:

> Hi Willy,
> What is the engine you are using for the table? Paste the table =20
> structure.
> Thanks,
> Suresh Kuna
> ------Original Message------
> From: Willy Mularto
> To: mysql@lists.mysql.com
> Subject: High Overhead On Active Insert And Delete Table
> Sent: Jan 3, 2010 4:22 PM
>
> Hi list,
> I have a table which is very active in operation INSERT INTO and
> DELETE, approximately there will be around 2millions INSERT and DELETE
> operation per day. And I see the overhead is getting very high, I must
> do OPTIMIZE TABLE query every time. Is there any other option to solve
> this? TIA.
>
>
>
> Willy
> sangprabv@gmail.com
>
>
>
>
> --=20
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: =
http://lists.mysql.com/mysql?unsub=3Dsureshkumarilu@gmail.co m
>
>
>
> Sent from BlackBerry=AE on Airtel


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: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