Tag Info

New answers tagged

0

A common practice is to have a status column that indicates whether or not the representative is active. Deleting data that you may wish to analyze in the future isn't a good idea. Instead, you could do something like this: representativeID status statusDate ------------------------------------------- 1 inactive 2014-03-20 2 ...


1

Your question already has the key to your answer. It does depend on row based or statement based replication. STATEMENT-BASED REPLICATION If you run DELETE FROM tblname WHERE blahblahblah; and the rows matching blahblahblah do not exist, no big deal. Replication will just carry on. It just take you a lot longer to realize your data draft on the Slave (or ...


2

If it's showing in your processlist then it's still running. In the future, for situations like this we're you're pruning 90%+ of the table consider this approach: create table new_table like old_table; insert into new_table (select * from old_table where <what you want to keep>) rename table old_table to old_table_drop_prep, new_table to old_table; ...


1

In your attempt: SELECT id FROM "players" where "players".born_on < "1950-01-01"; Then DELETE FROM "players" WHERE "players".id = 5; DELETE FROM "stats" WHERE "stats".player_id = 5; DELETE FROM "photos" WHERE "photos".player_id = 5; ... repeat First, I don't understand the "...= 5;" one each the subsequent deletes. What is the 5? But....what if ...



Top 50 recent answers are included