Skip to content
Login
Try for free
Login
Try for free

The Hyper-Fast Database that Truly Scales

Simply get the best out of the SQL and NoSQL worlds. Whatever the complexity, volume and velocity of data, CrateDB allows you to perform complex queries in milliseconds, where other database technologies simply can’t.

High Performance, High Scalability, Ease of Use and Low Footprint

Response time in milliseconds

Even for complex ad-hoc queries

Massive scaling

From one to hundreds of nodes

Read/Write intensive

For heavy concurrent workloads

Flexible data schema

Editable on the fly at runtime

Any type of data

Structured, semi-structured, unstructured, time-series, geospatial, BLOB

Aggregations on the fly

Even with complex joins, large datasets and historical data

Native SQL

For query simplicity and quick onboarding

PostgreSQL Wire Protocol

For 3rd party integrations

Full-text search

No need for any extra database

High availability

Automatic failover, recovery and replication

Multiple deployment models

DBaaS or self-managed / Edge extension

Cost-efficient architecture

Optimized infrastructure & operations / Low carbon footprint

Solutions

 

Examples of SQL queries

        
        

/* Based on device data, this query returns the average
 * of the battery level for every hour for each device_id
 */
WITH avg_metrics AS (
    SELECT device_id,
       DATE_BIN('1 hour'::INTERVAL, time, 0) AS period,
       AVG(battery_level) AS avg_battery_level
    FROM devices.readings
    GROUP BY 1, 2 
    ORDER BY 1, 2
)
SELECT period,
       t.device_id,
       manufacturer,
       avg_battery_level  
FROM avg_metrics t, devices.info i
WHERE t.device_id = i.device_id 
      AND model = 'mustang'
LIMIT 10;
        
        

+---------------+------------+--------------+-------------------+
|    period     |  device_id | manufacturer | avg_battery_level |
+---------------+------------+--------------+-------------------+
| 1480802400000 | demo000001 |    iobeam    | 49.25757575757576 |
| 1480806000000 | demo000001 |    iobeam    | 47.375            |
| 1480802400000 | demo000007 |    iobeam    | 25.53030303030303 |
| 1480806000000 | demo000007 |    iobeam    | 58.5              |
| 1480802400000 | demo000010 |    iobeam    | 34.90909090909091 |
| 1480806000000 | demo000010 |    iobeam    | 32.4              |
| 1480802400000 | demo000016 |    iobeam    | 36.06060606060606 |
| 1480806000000 | demo000016 |    iobeam    | 35.45             |
| 1480802400000 | demo000025 |    iobeam    | 12                |
| 1480806000000 | demo000025 |    iobeam    | 16.475            |
+---------------+------------+--------------+-------------------+
        
        

/* Based on reports from IoT devices, this query returns
 * the voltage corresponding to the maximum
 * global active power for each meter_id
 */

SELECT meter_id,
       MAX_BY("Voltage", "Global_active_power") AS voltage_max_global_power
FROM iot.power_consumption 
GROUP BY 1 
LIMIT 10;
        
        

+------------+--------------------------+
|   meter_id | voltage_max_global_power |
+------------+--------------------------+
| 840073190N |          233.57          |
| 840072401F |          233.53          |
| 840072655G |          234.1           |
| 840071893D |          234.47          |
| 840073950P |          231.73          |
| 840075260N |          235.51          | 
| 840076398A |          234.56          |
| 84007B071E |          231.94          |
| 840075959Y |          237.21          |
| 840072534A |          231.96          |
+------------+--------------------------+
        
        

/* Based on the location of the International Space Station, 
 * this query returns the 10 closest capital cities from 
 * the last known position 
 */
SELECT city as "City Name",
       country as "Country",
       DISTANCE(i.position, c.location)::LONG / 1000 AS "Distance [km]"
FROM demo.iss i
CROSS JOIN demo.world_cities c
WHERE capital = 'primary'
      AND ts = (SELECT MAX(ts) FROM demo.iss)
ORDER BY 3 ASC
LIMIT 10;
        
        

+--------------+-----------------------------------+---------------+
|  City Name   |             Country               | Distance [km] |
+--------------+-----------------------------------+---------------+
|    Papeete   |         French Polynesia          |      3386     |
|    Avarua    |           Cook Islands            |      3708     |
|  Wellington  |            New Zealand            |      4565     |
|     Alofi    |                Niue               |      4628     |
|  Nuku‘alofa  |               Tonga               |      4887     |
|  Pago Pago   |          American Samoa           |      5063     |
|   Santiago   |               Chile               |      5112     |
|     Apia     |               Samoa               |      5182     |
|    Stanley   | Falkland Islands (Islas Malvinas) |      5266     |
|     Suva     |               Fiji                |      5611     |
+--------------+-----------------------------------+---------------+
        
        

/*
 * Based on system event logs, this query calculates:
 * - a filter for specific messages using a full-text index
 * - the number of entries per minute
 * - the average scoring ratio for each matched row
 */
SELECT DATE_TRUNC('minute', receivedat) AS event_time,
       COUNT(*) AS entries,
       AVG(_score) AS avg_score
FROM "syslog"."systemevents"
WHERE MATCH(message, 'authentication failure') 
USING most_fields WITH (analyzer = 'whitespace')
   AND MATCH(syslogtag, 'sshd')
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10;





        
        

+---------------+---------+--------------------+
|    event_time | entries |          avg_score |
+---------------+---------+--------------------+
| 1620220260000 |       4 | 1.5798743814229965 |
| 1620220200000 |       8 | 1.7750384211540222 |
| 1620220140000 |      10 | 1.6113891124725341 |
| 1620220080000 |       9 | 1.676726798216502  |
| 1620220020000 |       8 | 1.6908064410090446 |
| 1620219960000 |       8 | 1.690401442348957  |
| 1620219900000 |       7 | 1.7646006005150932 |
| 1620219840000 |       7 | 1.7795820917401994 |
| 1620219780000 |      10 | 1.5844267368316651 |
| 1620219720000 |      13 | 1.5637413492569556 |
+---------------+---------+--------------------+







About us

At CrateDB, we are passionate about data.

We believe that in a modern world full of data, getting immediate access to the insights you need is essential. That’s why we are on a mission to provide companies with reliable and scalable database technology where response time is never an issue, regardless of the complexity and volume of data.

Upcoming Events

Webinar

CrateDB Workshop is a hands-on learning experience for novel and experienced users. The workshop introduces the fundamental concepts of CrateDB, a...

Meetup

Join us for the CrateDB Office hour. The next session takes place on October 18th, starting at 5 PM CET. Use this opportunity to learn more about...

Recent Recordings

Webinar

This demo offers a step-by-step guide on leveraging Debezium and Kafka to replicate data from different databases into CrateDB.

Webinar

CrateDB Workshop is a hands-on learning experience that introduces the fundamental concepts of CrateDB, a distributed SQL database. This workshop is...

Webinar

In this interactive live demo, learn, step-by-step, how to use Prometheus and Grafana with CrateDB Cloud.