Jump to content

Deleting from multiple tables


zaver

Recommended Posts

Hello,

 

I am working on a web app that allows users to create accounts and also terminate them. In the case that a user closes the account i must delete his information from multiple tables.

As far as i know i can either use a join delete query or delete sequentially from one table at a time. Please note that my tables are MyISAM not InnoDB (use foreign keys for delete)

 

I need help with the following:

 

1)Is there a difference performance wise in join-deletion vs deleting from one table at a time?

 

2)What do you think is the best way to go with deleting a users info from multiple tables?

 

 

Also I was thinking about creating a "temp delete table" to hold the keys to the entries to be deleted there and perform a mass delete once a week.

 

I guess that might be better than actually deleting all the info on the spot?

 

But again should i use a join delete or sequential ? does it make any difference?

 

 

Any help would be greatly appreciated

 

Thank you,

Zaver

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.