I’m in work on a Saturday, doing some database munging. We have a large update that requires dropping a bunch of rows, and a schema change.
I wish we had a DBA on staff for times like this. Or maybe a kick-ass local consultant whom we could bring in from time to time.
The row drops are taking forever. We don’t use triggers, but we of course have FKs and indexes. I’ll bet a savvy DBA would know some tricks to make the drops go faster. Drop indexes first? Don’t use a transaction? Inhibit table scanning? Something something something.
I know about good db behavior in our application, and measurement techniques, and know enough to know what I don’t know (that’s always most important), and a few performance tricks esp. when using Django. But table munging tricks I’m not so hot on. It’s not for lack of desire; there are only so many hours in the day.