When you know enough SQL to get by


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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: