More Knowledge. Less Magic.

SQL is not Complex

A better understanding of SQL changes the database black box perception to a time saver reducing development effort.

👋 Hi, I am Tobias Petry.

I am database specialist helping developers solve their database problems. Many developers still treat databases and SQL as a black box: You write a query with a lot of trial and error, and hopefully the database returns the expected results. The implications of the query's properties or processing in the database are unknown to you. And because of the simple handling of MySQL, MariaDB, PostgreSQL and others, this basic knowledge has always been sufficient!

However you are missing out on many useful features! Some of the operations you have implemented in your application's code could have been done by the database and saved a lot of development time. And when your database has performance problems, expert knowledge is needed. But you don't have to become a database specialist too, just a little bit more knowledge will. However you don't have to become an expert, knowing a little more will make a big difference. And for this purpose this repository of knowledge has been created, check out all the information and learn anytime you may want to.

Latest Tips

Bite-sized database tips you can use in your application in a minute.

View All

Fill Gaps in Statistical Time Series Results

Statistical calculations on a timeframe may have gaps due to missing that can be filled easily directly in the query.

August 31, 2022

Cycle Detection for Recursive Search in Hierarchical Trees

Recursive queries searching within a hierarchical tree need to be protected for not failing on accidental loops in the data's references.

August 03, 2022

Delete Duplicate Rows

Duplicate rows can be easily found and deleted with a single query including a selection of which ones to keep.

July 20, 2022

Sorted Tables for Faster Range-Scans

Storing rows pre-sorted in tables instead of by insertion order will boost the performance for large databases significantly.

June 22, 2022

UUIDs to prevent Enumeration Attacks

Most applications are vulnerable to scrapers because of incrementing IDs. Retrofitting a UUID columns will solve the issue.

June 08, 2022