Building a Database with Python
summary
EdgeDB is a new relational DB built on PostgreSQL with a Python-coded async IO server and a Python compiler stack that compiles a GraphQL-like query language (HQL) down to SQL. Hot paths use uvloop and C extensions (Cython-style) while a small Rust tokenizer extracts constants for query caching. The system uses immutable state via the immutables package, heavy mypy typing and plans mypyc for speed. Benchmarks claim 2–5x faster for Python ORMs and up to ~1000x vs some JS ORMs; some scheduling limits remain and a future rewrite is considered.
AI-written summary · about
