Native SQL
CrateDB speaks native SQL, the language data professionals already know and trust.
No proprietary query syntax. No steep learning curve. Just pure SQL, extended to handle time series, text, geospatial, JSON, and vector data at scale.
With CrateDB, you can query, aggregate, and search across any data type in real time, using the same SQL syntax you already use for relational data.
SELECT region, AVG(temperature) AS avg_temp, COUNT(*) AS events FROM sensor_data WHERE ts > now() - INTERVAL '5 minutes' GROUP BY region ORDER BY avg_temp DESC;
Why SQL Matters
SQL is the universal language for data analysis. CrateDB takes it further, making it distributed, real-time, and multi-model.
- Standard SQL interface: Use ANSI SQL syntax and familiar commands like SELECT, JOIN, GROUP BY, ORDER BY, and HAVING.
- Universal accessibility: Connect seamlessly via PostgreSQL wire protocol, drivers, HTTP, or SQLAlchemy.
- Unified data access: Query relational tables, nested JSON objects, time series events, and vector embeddings, all in a single SQL statement.
- Real-time execution: Distributed SQL engine executes queries in parallel across all nodes for results in milliseconds, even on massive datasets.
Key SQL Capabilities
CrateDB extends standard SQL with advanced features to handle today’s complex data:
- Real-time aggregations: Compute metrics, trends, and KPIs instantly over billions of records with distributed GROUP BY and window functions.
- Full-text & hybrid search: Combine MATCH for relevance-based text search and KNN_MATCH for semantic vector search, directly in SQL.
- Time series analytics: Use SQL date/time functions, window operators, and table functions to analyze high-frequency data streams efficiently.
- JSON and object queries: Access nested fields with simple notation (my_column['key']), and index them automatically for high-speed filtering.
- Geospatial analytics: Use SQL functions like within(), distance(), and intersects() to query spatial relationships and visualize results.
- User-defined logic: Create user-defined functions (UDFs) in JavaScript and run custom logic inline with your SQL statements.
Developer-Friendly and Open
CrateDB implements the PostgreSQL Wire Protocol, ensuring compatibility with most SQL tools using the PostgreSQL drivers:
- BI and visualization: Grafana, Superset, Tableau ...
- Data engineering: dbt, Airflow, Kafka Connect ...
- Application frameworks: Spring Boot, Django, Node.js ...
Built for Modern Workloads
| Traditional SQL Databases | CrateDB |
|---|---|
| Limited to structured data | Handles structured, semi-structured, and unstructured data |
| Vertical scaling only | Fully distributed and horizontally scalable |
| Batch analytics | Real-time queries on live data |
| Complex indexing management | Automatic indexing and adaptive schema |
| Hard to integrate with AI/ML | Feeds AI models and semantic search pipelines |
Why Teams Choose CrateDB for SQL
- No retraining needed: Analysts, developers, and data scientists all use the same SQL syntax.
- Instant scalability: Automatically parallelized queries, no manual sharding or tuning.
- Multi-model flexibility: From IoT telemetry to documents to AI vectors, all data is queryable with SQL.
- Operational simplicity: Deploy anywhere (cloud, hybrid, on-prem, edge) and manage via SQL or REST API.
Whether you’re analyzing sensor data, searching documents, or feeding AI models, CrateDB lets you do it all with one powerful, familiar language: SQL.