March 2026 · San Francisco
AI Tools Write More Database Queries Than Ever. Gold Lapel Makes Sure They're Fast.
New self-optimizing PostgreSQL proxy that analyzes queries in real time, creates indexes and materialized views automatically, and builds a three-tier cache with automatic invalidation.
Every day, AI coding assistants generate millions of lines of application code — and with it, millions of database queries that no human has had the opportunity to review for performance. ORMs, query builders, and AI tools produce SQL that works correctly but runs slowly — missing indexes, redundant joins, N+1 patterns. Teams understandably reach for a caching layer — adding operational complexity for optimizations PostgreSQL could handle natively.
Gold Lapel, launching today, sits between your application and PostgreSQL, observes query traffic, and implements the optimizations a senior DBA would — automatically and continuously, as workloads evolve.
The Question That Started It
“I observed an AI coding tool duplicate data across two tables because joining was ‘too slow,’” said The Waiter of Gold Lapel. “It did precisely what developers have been doing for years. It learned from our example.”
Gold Lapel exists because there is a better path available,
and it should be easy to take.
“Your PostgreSQL database has more capability than most teams have had the opportunity to explore. It already knows the answers to your most expensive queries. It simply needs someone to set the table before the guests arrive. That is what we do.”
How It Works
Install the package for your language. Call gl.start() with your database URL. If you'll permit me, that is the extent of the disruption.
Observe — Gold Lapel watches your query traffic and takes careful note of what requires attention: sequential scans, missing indexes, N+1 patterns, deep pagination anti-patterns.
Rewrite — Queries are transparently rewritten to use the optimized paths. Your application sends the same SQL it always has. The responses simply arrive rather more promptly.
Optimize — It creates materialized views and targeted indexes (B-tree, covering, trigram GIN, expression, partial), consolidating overlapping patterns so the work is done once and done well.
Verify — Shadow mode tests every optimization against live results before routing production traffic. Nothing reaches your users without correctness verification.
Safeguard — Bellhop mode provides instant passthrough revert. Table exclusion lists and per-query skip annotations offer granular control. Row-Level Security is preserved through all rewrites.
Three Tiers of Optimization
Gold Lapel builds and maintains a continuously updated caching layer using your existing PostgreSQL infrastructure:
L1 Native Cache — 2.1 microseconds. An in-process cache within your application, made possible by the language, framework and ORM wrappers. Gold Lapel simply removes the network hop entirely.
L2 Proxy Cache — 0.5 milliseconds. An in-memory cache within the Gold Lapel proxy. A single TCP hop. Serves results when L1 has not yet had the opportunity to observe the query.
L3 Materialized Views — 0.7 milliseconds. Pre-computed query results stored in PostgreSQL itself. Full SQL semantics, continuously refreshed. Even a cache miss, if you'll forgive the expression, arrives with some haste.
Source of truth — PostgreSQL. The final word on every matter, as it should be.
Cache Invalidation, Handled
Most caching layers leave invalidation to the developer — write your data, then remember to invalidate every key that might be affected. Miss one, and your users see stale results. Build it correctly, and you find yourself maintaining a parallel system of invalidation logic that grows with every table, every relationship, every edge case. It is, if I may be direct, rather a lot of bookkeeping.
Gold Lapel sees every write as it passes through the proxy. When an INSERT, UPDATE, or DELETE touches a table, every cached result that references that table is invalidated automatically. No keys to name. No TTLs to estimate. No invalidation calls in your codebase. The matter is attended to.
Availability
Gold Lapel ships today with wrappers for 7 languages (Python, Node.js, Ruby, Go, Java, PHP, .NET), 4 frameworks (Django, Rails, Spring Boot, Laravel), and 3 ORMs (Prisma, SQLAlchemy, Drizzle). Linux, macOS, Windows, and Docker. Whatever your household runs, we are equipped to attend to it.
The Book
Gold Lapel has published You Don't Need Redis — a 19-chapter guide to PostgreSQL performance optimization that makes the case, thoroughly and without reservation, that most applications need only one database. Authored by The Waiter of Gold Lapel and available at goldlapel.com/books/you-dont-need-redis.
About Gold Lapel
Gold Lapel builds tools that help PostgreSQL serve as the only database service most applications need. The Waiter of Gold Lapel serves all the needs of the household. The Groundskeeper of Gold Lapel is Stephen Gibson. The estate is based in San Francisco.
“CDNs solved static data delivery — rather elegantly, I should note.
Gold Lapel sees to dynamic data, giving it the proper attention.”
— The Waiter of Gold Lapel
###
Media Contact
The Waiter of Gold Lapel
thewaiter@goldlapel.com
goldlapel.com