Cookbook
Practical, copy-and-run recipes for everyday jobs in ScramDB: loading data, searching vectors, ranking text, and working with locations.
Every recipe here runs on one engine and one live copy of your data. ScramDB is a UTAP (Unified Transactional Analytical Processing) database, so the same rows you write to serve your transactions, your analytics, and your search. There is no separate vector store to sync, no search cluster to feed, and no ETL pipeline in the middle. When a row changes, every query sees it immediately.
Because everything speaks the PostgreSQL wire protocol, you can run all of these recipes from psql or any PostgreSQL driver. See Quick Start to connect.
Recipesβ
- Loading data - Insert rows one at a time, upsert, and bulk-load millions of rows with
COPY. - Vector search - Rank rows by embedding similarity and combine it with ordinary SQL filters, in a single query.
- Full-text search - Match terms and rank results by relevance with BM25 scoring.
- Geospatial - Measure distances, find nearby points, and group locations into map cells.
How to read theseβ
Each recipe gives you SQL you can paste straight into a session and adapt. Column and table names are examples: swap in your own. Where a recipe touches performance, it says so and shows you the faster path.