In my last post, I showed you how you could use a number of SQL tricks to generate a class of fractals known as the “escape-time fractals”. In this post I’ll show you how you can use the same … Read the rest
Generating Fractals with Postgres: Escape-Time Fractals
This post is based on half of a talk I gave at !!con. If you want to watch the talk, you can find it here.
One not too well known aspect of SQL is that it’s Turing complete. This … Read the rest
Generating Fractals with SQL Queries
I recently gave a talk at !!Con West about how you can use some of the dark corners of SQL to generate fractals. You can watch the recording here:
To summarize the video, I write SQL queries that generate two … Read the rest
Perfalytics is now Generally Available
After being in beta for several months, Perfalytics is now generally available.
Perfalytics is my attempt to bring a new approach to database performance. Perfalytics integrates directly with your database to collect detailed performance information about your queries. Based on … Read the rest
Announcing Perfalytics: Never Run EXPLAIN ANALYZE Again
Today I’m announcing the beta for Perfalytics. Perfalytics is a tool I’ve been working on designed to make it easy to analyze query performance for Postgres. As the lead of the Database team at Heap, where I optimize the … Read the rest
Postgres Backups with Continuous Archiving
It’s extremely important that you have backups. Without backups, you are at serious risk of losing data. If you don’t have backups, all it takes is one machine failure or fat fingered command to lose data.
There are several different … Read the rest
JSONB is a nifty Postgres type that allows you to store unstructured data inside of Postgres. A common use case of JSONB is to represent a mapping from a set of keys to arbitrary values. JSONB is nice for this … Read the rest
The parameter track_io_timing is a relatively unknown, but super helpful parameter when optimizing queries. As the name suggests, when the parameter is turned on, Postgres will track how long I/O takes. Then, when you run a query with EXPLAIN (ANALYZE, … Read the rest
Avoiding Torn Pages
For the Postgres file layout, Postgres reads and writes data to disk 8kb at a time. Most operating systems make use of a smaller page size, such as 4kb. If Postgres is running on one of these operating systems, … Read the rest
TOAST aka The Oversized Attribute Storage Technique aka the best thing since sliced bread, is a technique Postgres uses to store large values. Under the normal Postgres data layout, every row is stored on 8kb pages, with no row … Read the rest