Skip to main content
ToraDB SQL supports catalog, DDL, retrieval SELECT, and analytics SELECT. Statements are case-insensitive for keywords.

Statement types

CategoryExamples
CatalogSHOW TABLES, DESCRIBE t, SHOW MATERIALIZED VIEWS
DDLCREATE TABLE, CREATE INDEX, DROP TABLE, COMPACT TABLE
RetrievalSELECT ... SPARSE SEARCH ..., VECTOR SEARCH ..., BOOST, DECAY, FACETS, HIGHLIGHT
AnalyticsSELECT agg ... GROUP BY, WHERE, HAVING
Functionsscalar functions (lower, length, date_trunc, …) and AS aliases
ViewsCREATE MATERIALIZED VIEW, REFRESH, DROP

Result shapes

  • Retrieval SELECT → ranked ids/scores (SearchResults in Python)
  • GROUP BY / aggregates → tabular analytics
  • DDL / DESCRIBE → text message

Pages

Tutorial: SQL guide.