If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Which is not a CPU intensive ????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-06, 07:37
spocke spocke is offline
Registered User
 
Join Date: Jan 2006
Posts: 2
Which is not a CPU intensive ????

Hi,

Under high loads, is it advisable to use "delete from table" or need to drop and recreate the table. Presently i use the delete query every seven minutes or based on record count say 5000 to remove the records, which results in CPU usage always above 70% !!!!!!

In addtion to this i need to know which operation consumes more CPU the " delete from table" or the drop and re-creation process ???

Mysql Info:
Version: 4.1.12
Table Type: InnoDB
No: Of Columns: 10
Use a criteria for deleting ex: delete from <table name> where ID < and ID >
OS: Windows/Unix

--spocke
Reply With Quote
  #2 (permalink)  
Old 01-11-06, 14:50
Ida Hoe Ida Hoe is offline
Registered User
 
Join Date: Aug 2003
Location: West
Posts: 98
TRUNCATE TABLE TableName A feature/function that does almost the same as the SQL : DELETE FROM table_name They both have the same effect but TRUNCATE is faster and does not return the number of rows affected. Dependent on your version of MySql you may omit the TABLE and use the following: TRUNCATE table_name
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On