2,822 reputation
1618
bio website karwin.com
location California
age 46
visits member for 2 years, 11 months
seen 18 hours 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.


Jun
12
comment Cannot add foreign key constraint while creating table
I tried your case in MySQL 5.6 and it worked fine, but I had to create also tables Movie and Rent_Status. InnoDB does support NO ACTION syntax. Note that the column referenced by a foreign key must be the leftmost column in a key in its table.
Jun
8
comment Amount of data in a database table
This is tangential to your question, but in most cases a FLOAT or DOUBLE column should be DECIMAL instead.
Jun
4
revised Cannot execute statement: impossible to write to binary log?
edited tags
Jun
4
comment Only “grant usage”, but can still select, drop, create?
FWIW, this is fixed in Percona Server. I.e. we just don't add those rows in our distribution.
Jun
3
revised Is there a product to auto-build indexes based on slow queries?
edited tags
Jun
3
comment MySQL crashes frequently
Sizing the buffer pool as a percentage of RAM assumes a certain typical range for the size of RAM. Don't take it as a law, it's a guideline for the typical case. You have a non-typical case, i.e. not enough RAM.
Jun
3
answered Is there a product to auto-build indexes based on slow queries?
Jun
2
revised Why am I getting different results from a query vs. a view
edited tags
Jun
2
revised Why am I getting different results from a query vs. a view
added 459 characters in body
May
30
comment How are auto_increment keys handled in INSERT (SELECT * FROM…)
Clever, but to me, that counts as spelling out the full list of column names you want to insert.
May
30
revised Why am I getting different results from a query vs. a view
edited tags
May
30
answered Why am I getting different results from a query vs. a view
May
30
revised MySQL slave database wont start
edited body
May
30
answered MySQL slave database wont start
May
30
awarded  Citizen Patrol
May
30
answered MySQL memory usage issues?
May
30
answered MySQL crashes frequently
May
29
comment MySQL incremental backups per database (not global)
Yeah, like any tool, it will probably take you a while to experiment with it to figure out if it meets your needs.
May
25
comment Partitioning large mysql table
Yes, I'd monitor INFORMATION_SCHEMA.PARTITIONS to see how many rows are in the latter partitions.
May
23
comment update an id to max+1 in current table? (MySQL)
Yes, sorry, I misread your original query and tested with just the columns I had in my test table. Yes, you can select the j1 row in whatever way you want.