I found this great collection of notes: Database Programming – An Intermediate MySQL Tutorial – Scripting, Data Types, Examples.
Category Archives: Database
Prepared statement needs to be re-prepared
I have seen this error before, Prepared statement needs to be re-prepared, I’m not sure if I will see it again, but just in case I’m keeping this link…
MySQL admin with Ian Gilfillan
I was doing some reading today and I came upon an old series of articles over on www.databasejournal.com by a dude called Ian Gilfillan:
- MySQL backups
- Database Replication in MySQL
- Restoring lost data from the Binary Update Log
- Optimizing MySQL: Queries and Indexes
- Optimizing MySQL: Hardware and the Mysqld Variables
- MySQL’s Query Cache
- MySQL’s Over-looked and Under-worked Slow Query Log
For the ‘type’ in SQL ‘EXPLAIN’ Ian says: from best to worst the types are: system, const, eq_ref, ref, range, index, all.
It seems this Ian Gilfillan fellow has been rather prolific.
How to Efficiently Choose the Right Database for Your Applications
Some interesting thoughts on How to Efficiently Choose the Right Database for Your Applications.
ZFS performance tuning
I read The Next Gen Database Servers Powering Let’s Encrypt which mentioned how they tuned ZFS.
Wide indexes or hashing
Today on 8.3.6 Multiple-Column Indexes I learned about the hash index technique:
SELECT * FROM tbl_name WHERE hash_col=MD5(CONCAT(val1,val2)) AND col1=val1 AND col2=val2;
As they say: “As an alternative to a composite index, you can introduce a column that is “hashed” based on information from other columns. If this column is short, reasonably unique, and indexed, it might be faster than a “wide” index on many columns. In MySQL, it is very easy to use this extra column.”
Codd’s 12 rules
Today in my travels I came across Codd’s 12 rules. They are rules for what qualifies as a relational database. Apparently these rules are discussed in RELATIONAL MODEL DATABASE MANAGEMENT 2 but as that is $486 I will not have a copy any time soon…
Stop checking for NULL pointers!
Read this great article Stop checking for NULL pointers! It mentions that there are many other invalid pointers than NULL, which is the same idea I had recently with regard to foreign keys in databases.
What ORMs have taught me: just learn SQL
This old chestnut What ORMs have taught me: just learn SQL popped up on HN today.
What it takes to run Stack Overflow
Today What it takes to run Stack Overflow popped up on r/programming. It’s an old article (2013) but still interesting. It referenced Performance is a Feature and made the bold-font claim that “the cost of inefficient code can be higher than you think.”