Morgan Tocker ([info]mtocker) wrote,

My MySQL Conference Submission 2010: Workarounds

I just submitted an abstract for the MySQL Conference 2010. What do I want to talk about? Workarounds.

Domas likes to do tricks with GDB. Sheeri likes symlinking log files to /dev/null when not in use. Peter likes to do what he calls a delayed join, and I like to use IN() lists.

What's your favorite workaround? Are there any that you've seen people use in production that no longer work (or could be considered harmful)?

What I can think of so far:
* We no longer have to use this .frm trick on ENUM columns in 5.1.
* Remembering to "FLUSH LOGS" when you delete the log file and add the symlink is important ;) You can't see them in an ls, but the open log files will just keep growing in the background (can be seen with lsof). If you're using MySQL 5.1, it's much better just to handle this at the mysql server level.

Input wanted!
Tags: mysql

  • Post a new comment

    Error

    Your IP address will be recorded 

  • 8 comments

Anonymous

January 12 2010, 19:02:42 UTC 2 years ago

Stupid INFORMATION_SCHEMA tricks

I like http://www.mysqlperformanceblog.com/2008/11/24/using-information_schema-instead-of-shell-scripting/

[info]mtocker

January 12 2010, 19:20:54 UTC 2 years ago

Re: Stupid INFORMATION_SCHEMA tricks

Yes - good one!

I think the article misses the power of this trick, which is that you can (easily) xargs the resulting SQL to replay to MySQL concurrently (see -P option to set number of parallel threads).

This means that you can repair MyISAM tables concurrently, or run OPTIMIZE on your fragmented InnoDB tables with the least downtime.

[info]mtocker

January 12 2010, 19:26:38 UTC 2 years ago

Re: Stupid INFORMATION_SCHEMA tricks

Example here:
http://glynndba.blogspot.com/2009/09/sql-from-sql.html

Anonymous

January 12 2010, 19:22:57 UTC 2 years ago

So, you have 3 workarounds of your own, 3 from other people, and are soliciting more from the community?

That doesn't really give me confidence in you...frankly I'd expect the Percona folks to be full of workarounds (since mysqlperformanceblog.com has lots of them). If you can't be bothered to do research on your own company's blog, how good is the presentation going to be?

Also, how good are *you* as an expert consultant DBA for Percona if you don't have tons of workarounds like this? Someone like Peter Z. has tons of them, since most of the workaround posts are his.....

I expect a speaker at a conference to be an expert in what they're talking about. I've thought it was lame in the past when a supposed expert gets a talk accepted and then asks the community "what do you want to see?" or "how have you solved this issue?"

It's too late once your talk is accepted; you're supposed to be an expert already! Otherwise you look like you have no idea what you're talking about and have to ask the community, and most of us have never spoken before at all, much less at *THE* MySQL conference.

[info]mtocker

January 12 2010, 19:49:24 UTC 2 years ago

"So, you have 3 workarounds of your own, 3 from other people, and are soliciting more from the community?"

Yes, I'm asking people for input. My list wasn't meant to be exhaustive - I don't know why you have to jump on me for leading in with a few of my favorites as a teaser.

It's completely fair game to ask people what they want to hear about. As well as the speaker being technical, they also have to be relevant.

Did you forget your coffee this morning?

[info]rpbouman.blogspot.com

January 12 2010, 22:30:58 UTC 2 years ago

Workarounds...indeed a topic every developer working with MySQL will have had to deal with. Anyway, here's one I recently updated:

http://forge.mysql.com/tools/tool.php?id=246

(it gets the original code for a view, instead of the punctuation noise you get out of the information_schema.VIEWS table)

[info]mtocker

January 13 2010, 17:37:56 UTC 2 years ago

Nice tip ;) It reminds me of a bug from the SHOW CREATE TABLE output from partitioned tables pushed in just before GA:

http://bugs.mysql.com/bug.php?id=14326

At least partitioning syntax is now readable.

[info]swanhart

January 15 2010, 23:34:47 UTC 2 years ago

The Infobright community has put together some workarounds for the community edition, such as using a stored procedure or mysql_proxy to replace CREATE TABLE .. AS SELECT.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…