QueryFlow (@getQueryFlow) header
QueryFlow (@getQueryFlow) profile picture

SQL editor, scheduler, and pipelines in one native Mac app. Daily notes for people who write queries.

Joined October 2026
Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)
Amazon Redshift extension for DuckDB brings warehouse scale to local SQL Amazon Redshift now offers the Redshift extension for DuckDB, an open source extension that lets you run Amazon Redshift SQL from a local DuckDB session. Query results come back as DuckDB relations, so y...
1
1
1
1,296
QueryFlow retweeted
Announcing #DuckDB Scales 🦆🏋🏽 DuckDB Scales allows DuckDB to distribute the work across many nodes to process queries on 100 TB+ datasets. Starting now, DuckDB Scales is available as a preview in #AWS Athena, with an open source release planned for H1 '27.
16
42
17
280
23,979
During a Postgres migration the disk can fill up with WAL, the log of every change. A replication slot keeps that log until the new database reads it, and during the hours long initial copy it reads nothing, so cleanup stops. Raise max_slot_wal_keep_size before you start.
2
1
3
69
A startup kept BigQuery in prod and pointed dbt at DuckDB for CI. Result: 639 s of integration tests per merge became 46 s. The one trap is timestamps. Set TZ=UTC or DuckDB's local-zone default will disagree with BigQuery. Easy pattern to copy. duckdb.org/2026/11/24/sprout…
2
2
13
974
Supplier CSVs have the same headers in a different order? DuckDB can align them by name: SELECT * FROM read_csv('quotes/*.csv', header=true, union_by_name=true); Standardize the headers first. This won't tell you whether price and unit_price mean the same thing, or reconcile USD with EUR. Name-based alignment also uses more memory. Docs reviewed; not tested. github.com/duckdb/duckdb #GitHub #DataTools #InternationalTrade
1
1
2
36
QueryFlow retweeted
Cloud ops metadata as Iceberg tables means "which buckets grew last month?" becomes a SQL query instead of console clicks. The real win is joins across services, like AWS's own example: Glue tables no Athena query has read in 90 days. Databricks system tables already do this for the lakehouse, cost data included. teapaw.org/awswhatsnew/status/212…
AWS expands system tables to 20 AWS services and adds analytics visualizations AWS now publishes metadata from 20 AWS services as more than 100 system tables that you can query as open Apache Iceberg tables. The tables include data from storage, database, streaming, analytics...
1
1
1
122
Monday brings #AI Before trusting AI-written ad revenue SQL, test two impressions worth 1¢ each, where one matches two tracking events. The right total is 2¢. A plain SUM after the join gives 3¢, and SUM(DISTINCT revenue) gives 1¢.
1
1
28
Postgres tip: if CREATE INDEX CONCURRENTLY fails, it leaves an INVALID index behind. Queries ignore it, but every write still pays to keep it updated. A retry with IF NOT EXISTS just sees the name and skips. Drop it and run it again.
1
1
1
19
Asked Postgres for 10 failed rows ordered by ID and it scanned 10,000,000 rows (1,461 ms). Why: failures clump at the tail, so walking the PK index discards millions of healthy rows first. A Bitmap Heap Scan drops it to 9.6 ms.
2
1
1
31
Top 10 PostgreSQL mistakes that show up in prod: 1) SELECT * on hot paths. Wider rows, more IO, harder index-only scans, slower upgrades when columns grow. 2) No indexes for real queries. Filtering on user_id + status but only indexing user_id, then wondering why p95 jumps at 10M rows. 3) Adding indexes blindly. Every extra index slows writes, vacuum, and increases bloat. Measure before and after. 4) Missing composite index order. (a,b) helps a=… AND b=… and a=…, not b=… alone. 5) OFFSET pagination at scale. OFFSET 100000 still scans 100000. Use keyset pagination (WHERE id > last_id ORDER BY id LIMIT 50). 6) Long transactions. Autovacuum can’t clean dead tuples, replicas lag, and locks stick around longer than you think. 7) Ignoring VACUUM/autovacuum tuning. Default settings + write-heavy tables = bloat and surprise slowdowns weeks later. 8) No connection pooling. 500 pods each opening 20 conns turns into 10k backends, context switching, and memory pressure. Use pgbouncer. 9) Weak timeouts + retries. No statement_timeout, retries without jitter, and you amplify load during incidents. 10) No EXPLAIN (ANALYZE, BUFFERS) + poor observability. You ship a query, it regresses, and you have no slow query logs or pg_stat_statements to prove where the time went. [generated using my AI agent, hope you learnt something]
3
2
1
20
1,077
QueryFlow retweeted
Hit Save, read from a replica, still see the old value. Classic. #PostgreSQL 19 adds WAIT FOR LSN: a session on a read replica waits until the replica has replayed up to a given WAL position, then runs the query. So the replica catches up to that write before you read.
1
1
1
24
QueryFlow retweeted
MySQL InnoDB compression is still unstable. A lot of systems used table compression in the past, but later the official maintainers wanted to push page compression. However, because it relies too heavily on the file system, page compression never really took off. It's such a shame. dev.mysql.com/blog-archive/i…
2
4
1,116
QueryFlow retweeted
Every list endpoint needs a maximum page size, internal ones included. The query that returns a few hundred rows today will return millions the day a big customer onboards, and it will take the database down with it.
1
1
1
18
QueryFlow retweeted
A gateway webhook and the customer's return to the order received page can both complete one WooCommerce order. Each holds an unpaid copy, so the order emails go out twice. We now take a MySQL GET_LOCK per order and re-read it first. How do you guard yours?
3
1
2
195
QueryFlow retweeted
Zero to Hundred had Stripe calls running inside Postgres transactions Each one held a connection from a 20 connection pool while Stripe took its time CI now fails on any new one
1
1
1
42
When importing data in #Excel or #PowerBI via #PowerQuery, it is a good idea to set the column data types. But for wide tables is that this can take a lot of time as you have to wait for Power Query to catch up. 🙈 Here's how to quickly set ALL data types: youtube.com/watch?v=KGvfqm1n…
1
3
350
GitHub moved 130 of its busiest database tables to new machines without holding off writes for more than only a few tens of milliseconds For more than ten years most of GitHub sat on one main MySQL cluster. Users, repos, issues, PRs, all of it. An incident there hit everything at once, and the only way to scale was buying bigger machines The move was kinda boring by the time it happened. The app was already treating those tables like a separate database long before anything moved First they grouped tables that get joined and written together. Gists live with gist comments and starred gists, that kind of thing Then they added checks that fail any query touching tables from two different groups, plus a sampled one in production that flags transactions crossing groups. When a feature really needed both sides in one transaction, they moved that data into the same group so it stays on one machine. A group with zero crossings is safe to move I love how small the actual cutover is. The new cluster just copies from the old one like any replica. Then a script makes the old primary read only, waits for the last change to land, stops copying, points the app at the new cluster and turns writes back on. Done at the quietest hour, it caused a handful of failed writes only In 2019 that one cluster was serving 950K queries a second. By 2021 the same tables spread across several clusters were serving 1.2M, and the average load per machine had halved github.blog/engineering/infr…
3
5
82
5,368
If CREATE INDEX CONCURRENTLY fails, Postgres leaves an INVALID index behind. The planner skips it, but every write still pays to maintain it. I found one on a payments table months after a migration timed out. Query in the image. I run it after every index migration now.
5
2
7
410