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)
Stop reading schema diagrams. We pointed QueryFlow at a public MySQL database nobody on the team had ever opened. 64 tables. No docs. Asked "what's in this database." It explained the schema. Asked for a query with a join. It wrote it, explained the join, ran it. Rows on screen in about a minute. Then hit Watch this and it pings Slack or email when the row count or a value changes. Or schedule it to land in S3, SFTP or your inbox every morning. Watch: youtu.be/x2gxwMklboU Try it free for 14 days: getqueryflow.com/?utm_source…
2
147
EXPLAIN ANALYZE doesn't just plan your DELETE. It runs it, and those rows are gone. To see the real plan and keep your data, wrap it in a transaction: BEGIN; EXPLAIN ANALYZE DELETE FROM orders WHERE status = 'test'; ROLLBACK; Plain EXPLAIN only plans, so it's safe on its own.
1
Monday question: which database error message do you wish just said what it meant? Ours is "must appear in the GROUP BY clause or be used in an aggregate function," which usually means one column in your SELECT never made it into the GROUP BY. What's yours?
1
6
QueryFlow retweeted
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
31
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. teapawt.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
75
A query stuck for ten minutes may not be working at all. It could be waiting on a lock. In Postgres, this shows who's stuck and who's blocking: SELECT pid, pg_blocking_pids(pid) AS blocked_by, left(query, 50) FROM pg_stat_activity WHERE cardinality(pg_blocking_pids(pid)) > 0;
1
7
QueryFlow retweeted
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
23
QueryFlow retweeted
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
16
BigQuery's billing controls went GA on Nov 23. One turns off on-demand billing, so any query without an assigned reservation fails: ALTER ORGANIZATION SET OPTIONS ( `region-us.disable_on_demand_billing` = true); Find the unreserved projects first, or Monday's reports will.
1
5
Postgres can hand back the id it just generated, no second SELECT needed: INSERT INTO customers (email) VALUES ('[email protected]') RETURNING id; RETURNING works on UPDATE and DELETE too, with one row back for every row changed. getqueryflow.com/?utm_source…
2
12
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
28
Alphabetical order puts closed tickets ahead of urgent ones. A CASE in ORDER BY sorts by the order you actually care about: ORDER BY CASE status WHEN 'urgent' THEN 1 WHEN 'open' THEN 2 WHEN 'waiting' THEN 3 ELSE 4 END Any status you didn't list lands at the end.
1
7
Sunday question: what's the most confusing column name you've ever inherited? We're thinking of things like flag2, status_new_final, or a column called date that turns out to hold text. Tell us what yours actually meant.
3
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
19
1,028
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
SELECT DISTINCT status FROM orders ORDER BY created_at errors in Postgres: ORDER BY expressions must appear in the select list. Each status covers many rows with different dates, so there's no single created_at to sort by. Use GROUP BY status ORDER BY min(created_at).
1
1
What's the oldest query still running at your job that nobody wants to touch? Bonus points if the comment at the top says "temporary."
1
6