Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/questdb/questdb/llms.txt

Use this file to discover all available pages before exploring further.

Quick Start Guide

Get QuestDB running locally in under 5 minutes using Docker. This guide will walk you through starting QuestDB, connecting to the web console, and running your first query.

Prerequisites

  • Docker installed on your system

Step 1: Start QuestDB

1

Run the Docker container

Open your terminal and run the following command:
docker run -p 9000:9000 -p 9009:9009 -p 8812:8812 questdb/questdb
This command:
  • Downloads the latest QuestDB Docker image (if not already present)
  • Starts QuestDB with three ports exposed:
    • 9000: Web Console and REST API
    • 9009: InfluxDB Line Protocol (ILP) for high-performance ingestion
    • 8812: PostgreSQL wire protocol for programmatic queries
The container runs interactively. To stop it, press Ctrl+C in your terminal.
2

Verify QuestDB is running

You should see output similar to:
2026-03-03T12:00:00.000000Z I server-main QuestDB is running
2026-03-03T12:00:00.123456Z I http-server listening on 0.0.0.0:9000
2026-03-03T12:00:00.234567Z I pg-wire-server listening on 0.0.0.0:8812
2026-03-03T12:00:00.345678Z I ilp-tcp listening on 0.0.0.0:9009
QuestDB starts with sensible defaults and is immediately ready to accept connections.

Step 2: Access the Web Console

1

Open your browser

Navigate to http://localhost:9000You’ll see the QuestDB Web Console—an interactive SQL editor with syntax highlighting, query history, and data visualization capabilities.
2

Explore the interface

The Web Console provides:
  • SQL Editor: Write and execute queries with auto-completion
  • Schema Browser: View tables, columns, and data types
  • Results Grid: Inspect query results with filtering and sorting
  • Chart View: Visualize time-series data

Step 3: Run Your First Query

1

Create a table

In the Web Console SQL editor, create a sample table:
CREATE TABLE temperatures (
    sensor_id SYMBOL,
    location SYMBOL,
    temperature DOUBLE,
    timestamp TIMESTAMP
) TIMESTAMP(timestamp) PARTITION BY DAY;
The TIMESTAMP(timestamp) designates the timestamp column as the table’s designated timestamp. The PARTITION BY DAY clause creates daily partitions for efficient data management.
2

Insert sample data

Insert some sensor readings:
INSERT INTO temperatures VALUES
    ('sensor_1', 'warehouse_a', 22.5, '2024-01-15T10:00:00.000000Z'),
    ('sensor_2', 'warehouse_a', 23.1, '2024-01-15T10:01:00.000000Z'),
    ('sensor_1', 'warehouse_a', 22.8, '2024-01-15T10:02:00.000000Z'),
    ('sensor_3', 'warehouse_b', 19.4, '2024-01-15T10:00:00.000000Z'),
    ('sensor_3', 'warehouse_b', 19.7, '2024-01-15T10:03:00.000000Z');
3

Query the data

Run a query using QuestDB’s time-series SQL extensions:
SELECT 
    sensor_id,
    location,
    AVG(temperature) AS avg_temp,
    MAX(temperature) AS max_temp,
    MIN(temperature) AS min_temp
FROM temperatures
WHERE timestamp > '2024-01-15T10:00:00.000000Z'
SAMPLE BY 5m;
This query uses SAMPLE BY to aggregate data into 5-minute intervals—a powerful time-series feature unique to QuestDB.
4

View latest readings

Use LATEST ON to get the most recent reading per sensor:
SELECT sensor_id, location, temperature, timestamp
FROM temperatures
LATEST ON timestamp PARTITION BY sensor_id;
LATEST ON is highly optimized in QuestDB and runs in constant time regardless of table size.

What’s Next?

Ingestion Methods

Learn about different ways to ingest data into QuestDB

SQL Reference

Explore QuestDB’s SQL dialect and time-series extensions

Client Libraries

Use official clients for Java, Python, Go, Rust, and more

Deployment

Deploy QuestDB in production on Docker, Kubernetes, or cloud platforms

SQL Reference

Explore QuestDB’s SQL extensions including ASOF JOIN, WINDOW JOIN, and time-series functions

Client Libraries

Connect from Python, Java, Go, Node.js, Rust, C/C++, and .NET

Deployment

Deploy QuestDB to production with Docker, Kubernetes, AWS, GCP, or DigitalOcean

Stopping QuestDB

To stop the Docker container:
  • If running interactively: Press Ctrl+C in your terminal
  • If running detached: Run docker stop <container_id>
Data is stored inside the container and will be lost when the container is removed. For persistent data, see the Installation guide to learn about mounting volumes.

Need Help?

Community Forum

Join technical discussions and ask questions

Public Slack

Chat with the QuestDB team and community

GitHub Issues

Report bugs or request features

Stack Overflow

Find common troubleshooting solutions