May 2024 Recap of Tobias Petry - Issue #33
MySQL Explain Explained
I've worked over the past months on new algorithms for MySQLExplain.com. When I started the development, I knew from day one that graphical explanations should be the end goal - but they are really hard. MySQL has many edge cases in its output that all have to be accounted for.
In May, I finally finished transforming the complicated and ambiguous explanation data model into an internal standardized one with which I could work more efficiently.
Late last week, I transformed this data model for the first time into a graphical visualization. The result is below. It is easy to understand for any developer without DB knowledge and miles ahead of MySQL Workbench.
This will be a pivot point for MySQL query optimization. 😃
Laravel PostgreSQL Driver
The usual problem with ORM libraries is their ability to represent multiple databases. At first, this sounds great, but each database is different and to implement only the common features of all databases means to miss many specific functions. Since I primarily work with the Laravel framework and PostgreSQL, I started to develop an extended driver to support more features of PostgreSQL: tpetry/laravel-postgresql-enhanced
Last month these remarkable features were added:
Laravel Query Expressions
The supported data types of all database engine are the same - but they are called differently. And even the way of casting one type to the other is different and sometimes workarounds are needed if a native casting functionality does not exist.
These edge cases are now simpler: A new expression has been added to cast values to integer, big integer, float and double.
Check out the package: tpetry/laravel-query-expressions
My Database Tips
I’ve removed the weekly database tips from this newsletter. You can still get them by subscribing to the SqlForDevs newsletter.
Interesting Articles, News and Tools
I’ve moved the monthly links of interesting findings to my SQL For Devs newsletter. Compared to just once a month, I now share new findings every week!



