3,097 reputation
1720
bio website karwin.com
location California
age 47
visits member for 3 years, 1 month
seen 55 mins ago

I'm Senior Knowledge Manager at Percona, a services company specializing in the MySQL database.

I've been a software engineer since 1987, and my specialty is as an SQL maven. I also have experience programming in Java, PHP, Perl, C, JavaScript, and I have many other coding skills.

I've written a book, SQL Antipatterns: Avoiding the Pitfalls of Database Programming from Pragmatic Bookshelf, based on the most common SQL problems I've answered on Stack Overflow and other forums, mailing lists, and newsgroups over the past 15 years.


1d
comment How to generate auto increment values for my duplicate column in my sql?
You just cross-posted this on StackOverflow. Please post to one site.
Aug
29
comment MySQL CPU & Memory Spikes
CPU spikes in MySQL are not uncommon, depending on the version. It could be a variety of causes. To be sure, you'd want to use oprofile or something to find out exactly which functions within the mysqld process account for the most execution time during the CPU spikes. My first guess is the query cache, which has been known to spend time resorting itself internally - try setting query_cache_type=0 and query_cache_size=0 and restart. See if that helps.
Aug
29
answered Row size error with MySQL
Aug
27
comment Proposal: MySQL blob handling revision
@IGotRoot, how would your idea support transaction isolation, transaction rollback, redo logging, or crash recovery? You should learn more about what databases do, that makes a database not the same as a filesystem.
Aug
25
comment How to change rows to columns in mysql?
It's hard to debug an SQL query by staring at the code that generates the query. I suggest you SELECT @sql to return the final query before you try to prepare it. The syntax error may be more clear if you look at the full query.
Aug
20
revised How to make MySQL log to 2 seperate remote servers?
added 182 characters in body
Aug
20
answered How to make MySQL log to 2 seperate remote servers?
Aug
15
comment Why is MySQL ignoring my indexes?
One should change IN (1) to = 1 to make those predicates be ref instead of range. Unless MySQL can optimize a 1-element list into a ref, but IIRC it can't do that.
Aug
15
answered Why is MySQL ignoring my indexes?
Aug
15
comment mysql - is it possible to create a partition expression based on two keys / indexes?
Both answers below are good, but let's be clear: the answer is no, you cannot partition a single table by two different keys. Can I separate my jellybeans by color and also by size? No -- at best you can do subpartitioning for the second condition. But that won't allow you to search only one partition when you search for jellybeans by size.
Aug
14
awarded  Revival
Aug
8
awarded  Revival
Aug
5
awarded  Yearling
Jul
31
revised MySQL replication issue when master gets restarted
added 12 characters in body
Jul
25
answered Is my MySQL instance irretrievably dead?
Jul
25
answered credentials file for running mysql related jobs via script?
Jul
25
comment Is my MySQL instance irretrievably dead?
Looks like you installed MySQL 5.1 over a 5.0 (or older) installation, without running mysql_upgrade to create new system tables and add columns to existing system tables.
Jul
23
awarded  Revival
Jul
15
comment Percona MySQL 5.5 Unique key is duplicated
To be fair, the market deserves some blame too, for creating the priority on performance over correctness.
Jul
15
revised Percona MySQL 5.5 Unique key is duplicated
added 176 characters in body