
SQL editor, scheduler, and pipelines in one native Mac app. Daily notes for people who write queries.
Joined October 2026
- Tweets798
- Following169
- Followers49
- Likes999
Pinned Tweet
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…
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
tell us yours, then try our SQL editor, free for 14 days: getqueryflow.com/?utm_source…
12
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
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. xitter.cf/awswhatsnew/status/212…
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;

ALT Find the blocker. A Postgres query on pg_stat_activity that selects pid, pg_blocking_pids(pid) as blocked_by, and the first 50 characters of the query, filtered to sessions where pg_blocking_pids is not empty. Example result: a waiting UPDATE orders SET status = 'void', blocked by the session holding the lock.
1
7
keep that blocker query handy in our SQL editor, free for 14 days: getqueryflow.com/?utm_source…
6
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¢.
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.
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
run your BigQuery checks from our SQL editor, free for 14 days: getqueryflow.com/?utm_source…
3
Postgres can hand back the id it just generated, no second SELECT needed:
INSERT INTO customers (email)
VALUES ('ana@example.com')
RETURNING id;
RETURNING works on UPDATE and DELETE too, with one row back for every row changed.
getqueryflow.com/?utm_source…
2
12
QueryFlow retweeted
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.
encountered Postgres' query planner again and wrote about it.
blog.mchl.xyz/post/expressio…
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
QueryFlow retweeted
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]
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.
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
give that old query a schedule, free for 14 days: getqueryflow.com/?utm_source…
5









