Skip to main content

Module pk_fast_path

Module pk_fast_path 

Source
Expand description

Fast-path execution for simple PK lookups

This module provides an optimized execution path for simple queries like:

  • SELECT * FROM table WHERE pk_col = $1
  • SELECT col1, col2 FROM table WHERE pk_col = 5

By detecting these patterns early, we bypass the full query planner and go directly to index lookup, reducing per-query overhead from ~2µs to ~200ns.

§Performance Impact

For Index Nested Loop joins that perform thousands of PK lookups, this fast-path can provide significant speedups by amortizing less overhead.