Page 1 of 1

DELETE and overheads

Posted: Tue Feb 17, 2004 8:11 am
by CoreLEx
Hi everyone

Quick question here from a relative newbie:

I've got a very basic table set up that I pull data from for one of my pages. I've also set up an admin page where I can approve or delete user submissions.

The problem is that whenever a row is marked for deletion and the SQL query "DELETE FROM table WHERE id=$records[$i];" is processed, I get about 20 bytes of overhead showing up in phpMyAdmin. I can optimize the table and get around the warning, but is there something very simple that I am missing and which is causing this to happen?

Thanks for any help.

Posted: Tue Feb 17, 2004 2:11 pm
by Weirdan
It's expected behavior. Rows are not deleted upon a DELETE query, but instead are marked as deleted. OPTIMIZE your tables from time to time if you're deleting a lot.