MySQL Explain Example – Explaining MySQL EXPLAIN using StackOverflow data

This post's contentThe query and database structureExplaining the original EXPLAINOptimizing a slow query using MySQL's EXPLAINThe optimized query's EXPLAIN outputConclusions I personally believe that the best way to deliver a complicated message to an audience, is by using a simple example. So in this post, I chose to demonstrate how to obtain insights from MySQL's… Continue reading MySQL Explain Example – Explaining MySQL EXPLAIN using StackOverflow data

SQL Order of Operations – In Which Order MySQL Executes Queries?

This post's contentFROM and JOINsWHERE clauseGROUP BY clauseHAVING clauseWindow functionsSELECT clauseDISTINCT keywordUNION keywordORDER BY clauseLIMIT and OFFSET Knowing the bits and bytes of an SQL query's order of operations can be very valuable, as it can ease the process of writing new queries, while also being very beneficial when trying to optimize an SQL query.… Continue reading SQL Order of Operations – In Which Order MySQL Executes Queries?

MariaDB vs MySQL – Key Differences – Comparing MySQL 8.0 with MariaDB 10.5

This post's contentIntroductionWho is using MySQL and MariaDB?Comparing features - MySQL vs MariaDBPerformance & BenchmarkingReplicationIncompatibilities between MySQL and MariaDBStorage enginesDeployed on Linux distributions by defaultAvailability on cloud platformsLicensingRelease-rate and updatesTechnical SupportOngoing DevelopmentSQL Query OptimizationConclusions Introduction The goal of this article is to evaluate and highlight the main similarities and differences between the MySQL Server Database… Continue reading MariaDB vs MySQL – Key Differences – Comparing MySQL 8.0 with MariaDB 10.5

Top 5 Ways To Improve Your Database Performance

This post's contentOptimize QueriesCreate optimal indexesGet a stronger CPUAllocate more memoryData defragmentationDisk Types Database version Summary In many cases, developers, DBAs and data analysts struggle with bad application performance and are feeling quite frustrated when their SQL queries are extremely slow, which can cause the entire database to perform poorly. Luckily, there is a solution… Continue reading Top 5 Ways To Improve Your Database Performance

Top 7 ways to learn to write better and faster SQL queries?

This post's contentBasic SQL trainingSQL Advanced trainingPerformance oriented trainingHighly Recommended Performance Related Books Imagine how spider-man's life would look like if he had never find out that he can shoot webs from his wrist... Not a good starting point, isn't it? Sometimes one can learn to write SQL queries but miss critical functionalities and important… Continue reading Top 7 ways to learn to write better and faster SQL queries?

Most popular databases in 2018 according to StackOverflow survey

The survey results from StackOverflow's developers survey are already here, and we can now declare the most popular databases for 2018. Without further ado, let's look into the results: So what can we learn from these results? The most popular database is MySQL, and not by far comes SQL Server. This wasn't very surprising, as… Continue reading Most popular databases in 2018 according to StackOverflow survey

How to Transfer a MySQL Database Between Two Servers?

This post's contentExporting MySQL database to a dump fileSecure the backup fileTransfer the backup fileImport MySQL dump to new serverValidate imported data in new serverAnother export & import optionImportant Notes Migrating a MySQL database usually requires only few simple steps, but can take quite some time, depending on the amount of data you would like… Continue reading How to Transfer a MySQL Database Between Two Servers?

MySQL is not using my index – Join with a range condition

This post's contentThe ProblemPossible WorkaroundsSolving the problem using bad practice #1 (Run a query in a loop)Solving the problem using bad practice #2 (Cartesian product)Conclusion This post is based on a true story from one of our team members. Here at EverSQL, we have high appreciation for the MySQL database. Said that, every product has… Continue reading MySQL is not using my index – Join with a range condition