Join 12,100 others and follow Sean Hull on twitter @hullsean. 1. Covers databases broadly You may not have noticed, but there’s a whole spectrum of relational databases on offer. Of course in the database world, most get infatuated with one, and that becomes their bread & butter before long. Their life, their passion, their devotion. […]
Join 15,000 others and follow Sean Hull on twitter @hullsean. 1. MySQL does not compete with Oracle It’s a myth that MySQL somehow poses a threat to Oracle. Oracle’s customers tend to be large enterprises running apps like e-business suite. These are certified to run on Oracle, and further they sit close to finance. MySQL […]
Join 8000 others and follow Sean Hull on twitter @hullsean. SQL is derided by many and for good reason. It’s key to scalability yet terribly difficult to write good code. Here’s a few quick tips to write tighter queries in MySQL 1. Get rid of those Subqueries! Subqueries are a standard part of SQL, unfortunately […]
The post 3 Simple Patterns for Tighter MySQL Code appeared first on Scalable Startups.
Join 7000 others and follow Sean Hull on twitter @hullsean. MySQL’s optimizer can do a lot of things, but subqueries are not always handled well. Take a look at the IN subquery below. If you see the DEPENDENT SUBQUERY in your explain plan, you may want to take a second look. This will run slow [...]
Join 6100 others and follow Sean Hull on twitter @hullsean. Lots and lots of web applications need to page through information. From customer records, to the albums in your itunes collection. So as web developers and architects, it’s important that we do all this efficiently. Start by looking at how you’re fetching information from your [...]
Join 6500 others and follow Sean Hull on twitter @hullsean. I just received my copy of the 5th Edition of Paul DuBois’ MySQL tomb. Weighing in at 1153 pages, it’s a solid text, with a very thorough introduction to the topic of administering MySQL databases. Buy the book here: MySQL 5th Edition by Paul Dubois [...]
Join 6100 others and follow Sean Hull on twitter @hullsean. There are two ways to speedup UNIONs in a MySQL database. First use UNION ALL if at all possible, and second try to push down your conditions. [mytweetlinks] 1. UNION ALL is much faster than UNION How does a UNION work? Imagine you have two [...]
Join 6100 others and follow Sean Hull on twitter @hullsean. The Foundation of Speed All servers use disk to store files. Operating system libraries, webserver & application code, and most importantly databases all use disk constantly. So disk speed is crucial to server speed. [mytweetlinks] [quote] Disk speed is crucial for MySQL databases. It has [...]
Here’s the last nail in the coffin. We hope this convinces you not to write to multiple masters with MySQL replication. Reason 10 – No tools to reconcile inconsistent masters For all the endless reasons we’ve already outlined MySQL replication is prone to failure. We know it’s going to happen, you now know too. When [...]
If you’re not convinced yet that writing to dual masters is a bad idea, we have a couple more reasons. 9. Temp tables break replication after restart MySQL’s replication is sensitive to temporary tables. You shouldn’t use them. If your queries create them to work against, and a node crashes, the temp tables will be [...]