Menu

Performance tune the indexes.

SQL Performance Tuning Tutorial – MySQL Query Optimization Tips

September 11, 2018
Tomer Shay @ EverSQL

This is the first part of our SQL Performance Tuning series. In this article, we’ll focus and MySQL related examples, but the same concepts can be applied to many other relational databases.

Now more than ever, software engineers need to have vast knowledge in SQL performance tuning.
The shift is happening in both small startups and large enterprises. Nowadays, developers are the ones writing the SQL queries and database access layer.

Your friends are probably optimizing SQL queries automatically – just submit your query 

SELECT
        prod.* 
    FROM
        products prod 
    LEFT JOIN
        purchase_history purch 
            ON prod.id = purch.product_id
     WHERE
        prod.name LIKE '%pizza%' 
        AND DATE(purch.purchase_date) > '2018-08-30' 
    GROUP BY
        prod.id

Start optimizing!

As technology advances, even the most novice end-users are becoming impatient and will expect your application to work quickly, even quicker than you’d expect. Therefore, we, as software developers, are bound to meet that endless need for fast and immediate response time, anywhere and anytime.

It doesn’t really matter if you’re using a database abstraction layer (Hibernate, JOOQ, Entity Framework, Sqlalchemy, Django, or others) or writing native SQL queries, you’ll eventually be challenged with tuning the queries you’re sending to your database.

0 Comment

Leave a Reply