Tobias Petry
banner
tpetry.me
Tobias Petry
@tpetry.me
The Database Guy. I am helping you get better with MySQL and PostgreSQL.

https://goodindexes.com
https://mysqlexplain.com
https://sqlfordevs.com
My free course about fast analytics with TimescaleDB is near - after a long time.

The design is almost finished and I am beautifying the first two modules now for a release at start of September.

So happy the first things will finally be released 😃
August 8, 2025 at 12:18 PM
I completely missed that my Laravel PostgreSQL driver crossed 1 million downloads two weeks ago!

Never imagined so many using it 🤯
April 23, 2025 at 10:33 AM
I am working on an interactive graph for the Timescale course to show that analytical queries get much slower the more data you have. Its fake numbers for now...

Do you prefer the first or second one? I like that the 2nd one doesn't need an extra axis to describe the points.
February 25, 2025 at 9:59 AM
I am finishing right now the docs on how to use Timescale with Laravel by implementing a simplistic requests performance logging system.

I am always amazed how easy you can build nice looking console output with Laravel ❤️
February 24, 2025 at 7:12 AM
I am creating a new course this year. 🔥

I will share with you how to make analytics queries (e.g. dashboards) on large data incredibly fast using Timescale. Just a few PostgreSQL queries executed and you're done - it's magically easy. I love it and always recommend it! ❤️
February 12, 2025 at 10:51 AM
🥳 Some great news next week. I am so full of energy for this year...
February 6, 2025 at 9:24 AM
OpenSource is a lot of hard work. Sometimes fun, sometimes daunting - depending on how nice your users are.

And sometimes you would like to know WHO is using your stuff and WHY:

I don't know why my install count is skyrocketing and I will never know - but really would love to
February 3, 2025 at 9:05 AM
Does anyone know of a package to integrate markdown with blade? So, for example embedding blade components into markdown.

I know that @aaronfrancis.com worked on it for his blog but never released it. Could need something currently too.
January 29, 2025 at 9:16 AM
But my most favourite feature is continuous aggregates: Why execute the same queries all the time when a user views the dashboard?

Let Timescale create a new table for a specific query and let it auto-update the values - IN REALTIME!

That's a gamechanger for performance 🔥
January 28, 2025 at 2:22 PM
Those policies are awesome to have everything happen automatically.

But sometimes you are changing rows after those policies have been executed by e.g. importing old data from a 3rd party system.

You can then also run all these actions manually again!
January 28, 2025 at 2:22 PM
But if we decide we still need the data after a long time? Its been deleted...

When using Timescale Cloud, you can use data tiering: Instead of deleting the data, its moved from your DB to Amazon S3.

Its never gone! And you can still query it like before 🤯
January 28, 2025 at 2:22 PM
Even after compression, disk usage will grow and grow indefinitely when inserting billions of rows a day.

But we're not interested in data older than a year 🤔

So we're creating a policy that everything older than 1 year will automatically be deleted - within milliseconds!
January 28, 2025 at 2:22 PM
Next we're activating compression to have less data to scan when querying the table -> faster performance.

The data can sometimes be compressed by 90% 🤯

All of this will happen in the background too with our compression policy that will compress all data older than 3 days.
January 28, 2025 at 2:22 PM
All data is always sorted by the insertion time. So data for one website is spread through the table -> not great for performance

We can ask Timescale to automatically reorder the rows in those daily tables so that data for the same website is nearby.
January 28, 2025 at 2:22 PM
First, we're telling Timescale to transform our table into a hypertabe and (invisibly) create new sub tables for every day.

This is our entrypoint for all the magic that is now being applied.
January 28, 2025 at 2:22 PM
🚀 New feature for my enhanced Laravel PostgreSQL driver:

Migration support for Timescale to do very fast analytics

👇 A quick overview of the easy steps you can do to get fast analytics on big data
January 28, 2025 at 2:22 PM
Has somebody experience with GitHub Codespaces?

I was able (with a lot of trial & error) to get it running for Laravel projects.

But on every page load at least 1-2 assets fail loading - different on each load. Its impossible to work with that weird behaviour...
January 26, 2025 at 8:27 AM