Well, my friend told me I should start using InnoDB for my database, so I tried for my first time. And I have a problem with deleting records/indexes/fields/tables. Whenever I try to delete a record, I have to go to ALL the relative records, delete those and then go back to delete my original record. And I can’t delete indexes at all! Is there an easier way to do this (since when I’m gonna run in in PHP, it won’t delete anything) or should I just jump back to MyISAM? Which of these is better in your opinion?
Share
If you like deleting stuff a lot, InnoDB might not be for you. InnoDB is much, much stricter than MyISAM. It’s faster when doing queries (
SELECT,SHOWetc), but slower when doing updates (UPDATE,INSERTetc).InnoDB’s CASCADE is magic, but be very carefull. It’s also very slow (because the db engine itself will check all constraints). If you’re delering records that cascade into other deletes that cascade into other updates that cascade into other deletes etc etc, you’ll be waiting a long time.
If you’re deleting in dev and are annoyed by InnoDB’s constraints, you might find
SET FOREIGN_KEY_CHECKS = 0;very helpful:Don’t use it in the app itself, or be absolutely sure that you won’t break any dependencies.