Custom Hacker News summaries in your inbox—build an AI Agent with Inngest and Render
A tutorial for building an AI agent that periodically searches Hacker News for user-defined topics and questions and emails summaries.
A tutorial for building an AI agent that periodically searches Hacker News for user-defined topics and questions and emails summaries.
PostgreSQL automatically indexes primary keys and UNIQUE columns but not the referencing column of a foreign key, so lookups on that side and ON DELETE CASCADE / SET NULL triggers fall back to full table scans.
Random sampling from billion-row PostgreSQL tables with ORDER BY random() scans every row and runs a top-N heapsort, taking over a minute.
Render's request routers evolved from per-instance in-memory caches with 5-minute TTLs and database lookups on miss, which overloaded PostgreSQL on every redeploy and failed during database downtime, to push-based caching using PostgreSQL LISTEN/NOTIFY so routers never query the database in the hot path.
A simple LIMIT 1 join between a ~100k-row postgres_dbs table and a ~90M-row events table ran for hours.
A seemingly simple indexed join with LIMIT 1 ran for over four hours on Render's staging PostgreSQL, holding a lock that blocked CREATE OR REPLACE VIEW migrations and stalled deploys.
PostgreSQL 14 adds jsonb subscripting, which lets queries read, filter and update nested JSONB values with JavaScript-like bracket syntax instead of path operators such as #>.