Skip to content

Ad-Hoc Queries

Query Any Data, Anytime, Instantly.

CrateDB lets you run ad-hoc SQL queries on live, streaming, or historical data — with millisecond response times and no pre-aggregation needed.

When business questions arise, you can’t wait for batch jobs or precomputed reports. CrateDB empowers you to query fresh data on demand, using standard SQL, even as new data keeps arriving. Its distributed engine and automatic indexing make ad-hoc exploration of massive datasets fast, flexible, and cost-efficient.

Real-time flexibility

CrateDB eliminates the trade-off between performance and freshness. You can query hot data as it’s ingested, from IoT sensors, logs, or user events,  without replication or delay.

Key advantages:

  • Query live and historical data in the same statement
  • Execute joins, filters, and aggregations across billions of records
  • Get instant results, even as new data flows in
cr-quote-image

Native SQL, no learning curve

CrateDB speaks SQL natively, making it instantly familiar to developers, analysts, and data scientists. You can query structured, semi-structured, and unstructured data in the same language, with full support for JSON, geospatial, time-series, and vector data.

Example use cases:

  • Investigate anomalies in streaming telemetry
  • Run ad-hoc reports on IoT or application events
  • Explore patterns and correlations across multiple data types
cr-quote-image

Automatic indexing and optimization

CrateDB automatically indexes every column and field, ensuring high-speed lookups and aggregations without manual tuning. Its distributed planner dynamically optimizes query execution, leveraging parallel processing across all nodes.

Why it matters:

  • Zero manual index management
  • Consistent performance under heavy load
  • Sub-second response time on large datasets
cr-quote-image

Native SQL, no learning curve

CrateDB speaks SQL natively, making it instantly familiar to developers, analysts, and data scientists. You can query structured, semi-structured, and unstructured data in the same language, with full support for JSON, geospatial, time-series, and vector data.

Example use cases:

  • Investigate anomalies in streaming telemetry
  • Run ad-hoc reports on IoT or application events
  • Explore patterns and correlations across multiple data types
cr-quote-image

Instant insight for everyone

Because CrateDB uses SQL and integrates with BI and visualization tools, anyone can ask questions and get answers, from developers and data engineers to business analysts.

Integrations include:

  • Grafana and Tableau for dashboards
  • Jupyter and Python for exploration
  • JDBC/ODBC for custom analytics pipelines
cr-quote-image

Ad-hoc queries in action

Imagine a logistics platform tracking millions of shipments per hour. With CrateDB, you can query delivery delays, identify bottlenecks, and filter by region or carrier, in real time, as data is being ingested. No ETL. No waiting. Just answers.

cr-quote-image

Why choose CrateDB for ad-hoc analytics

Traditional databases CrateDB’s real-time approach
Require pre-aggregated tables or views Query raw data instantly
Performance drops with large datasets Distributed parallel execution
Schema updates cause downtime Dynamic schema, no disruption
cr-quote-image

CrateDB Architecture Guide

This comprehensive guide covers all the key concepts you need to know about CrateDB's architecture. It will help you gain a deeper understanding of what makes it performant, scalable, flexible and easy to use. Armed with this knowledge, you will be better equipped to make informed decisions about when to leverage CrateDB for your data projects. 

CrateDB-Architecture-Guide-Cover

Additional resources

Want to learn more?