(Peter Zaitsev) When I’m doing conventional ALTER TABLE in MySQL I can ignore default value and it will be assigned based on the column type. For example this alter table sbtest add column v varchar(100) not null would work even though we do not specify default value. MySQL will assign empty string
Tag: Open Source
Derived Table Aliases
(Michael McLaughlin) In my database class, students write solutions as group exercises against the Oracle 11g XE database and then they port the solution individually to the MySQL 5.5 database. One of the students copied over a query like the one below to MySQL (a query used to track the expected nu
Find and remove duplicate indexes
(Miguel Angel Nieto) Having duplicate keys in our schemas can hurt the performance of our database:
On stored routines and dynamic statements
(Shlomi Noach) I very much enjoyed reading Overloading Procedures by Michael McLaughlin: good stuff!
Email Job Failures Report to DBA using PowerShell
(Rob Gravelle) MySQL is a bit of a strange animal in terms of scheduled task processing. While it did introduce its own brand of job scheduling called Events in version 5.1, some Database Administrators (DBAs) feel that it isn’t quite ready for prime time where robustness and error handling are con
Overloading Procedures
(Michael McLaughlin) A student asked, “Can you successfully overload MySQL stored procedures, like PL/SQL does in stored packages?” I said, “MySQL doesn’t formally support overloading stored procedures, and doesn’t support packages like Oracle 11g. You can, however, mimic (or fake) overloading with
Is query_cache really a good idea? Maybe not…
(Anders Karlsson) OK, the query cache is a pretty smart idea, right? When the same query is executed many times by many threads, and the data in the relevant tables isn’t touched so the query cache is invalidated, then the query cache is a pretty good idea, right? And even when not used, it really s
CHAR and spaces
(Shlomi Noach) I know about it, I knew about it all along, but… it’s so easy to fall for it; there’s just so much absurdity!
Pesky quoted identifiers in SQL
(Julian Hyde) The SQL that Mondrian generates is, until now, different than the SQL that most people would write by hand. Most people don’t use spaces or punctuation in table and column names, and don’t enclose identifiers in quotation marks when writing SQL DDL, DML or queries. Mondrian, on the oth
Why is UPSERT so complicated?
(depesz) If you worked with certain other (than PostgreSQL) open source database, you might wonder why PostgreSQL doesn’t have MERGE, and why UPSERT example in documentation is so complicated.
