Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    Unanswered: Which is not a CPU intensive ????


    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


  2. #2
    Join Date
    Aug 2003
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts