QuestDB Logo

 

[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)
## What is QuestDB QuestDB is an open-source database designed to make time-series lightning fast and easy. It uses a column-oriented approach, vectorized execution, SIMD instructions, and a whole array of low-latency techniques. The whole code base is built from scratch, without dependencies, in the name of performance. We are 100% free from garbage collection. QuestDB implements SQL, and augments it for time-series. It exposes a Postgres Wire protocol, a high-performance HTTP API, and even supports ingestion with Influx Line Protocol. It supports both relational and time-series joins, which makes it easy to correlate data over time. Writes are durably committed to disk, meaning that the data is safe, yet instantly accessible. ## Performance figures ### Raw figures Number operations per second **per thread**. Writes are durable and written to disk. | Operation | 64-bit double | 32-bit int | | --------- | -------------- | -------------- | | Read | 120 Million /s | 240 Million /s | | Write | 240 Million /s | 480 Million /s | On a CPU with 6 memory channels, QuestDB can scan through **117GB of data per second**. ### Queries Execution time on a c5.metal instance using 16 of the 96 threads available. | Query | Runtime | | --------------------------------------------------------- | ---------- | | `SELECT sum(double) FROM 1bn` | 0.061 secs | | `SELECT tag, sum(double) FROM 1bn` | 0.179 secs | | `SELECT tag, sum(double) FROM 1bn WHERE timestamp='2019'` | 0.05 secs | ## Getting Started The easiest way to get started is with Docker: ```shell script docker run -p 9000:9000 -p 8812:8812 questdb/questdb ``` You can more information about Docker usage [here](https://hub.docker.com/repository/docker/questdb/questdb/). #### Alternative methods - [Start with Homebrew](https://questdb.io/docs/guideHomebrew) - [Start with the binaries](https://questdb.io/docs/guideBinaries) ### Connecting to QuestDB You can interact with QuestDB using: - [Web Console](https://questdb.io/docs/usingWebConsole) listening on port `9000`: [localhost:9000](http://localhost:9000) - [Postgres Wire](https://questdb.io/docs/guidePSQL), for example with PSQL (alpha) on port `8812` - [HTTP API](https://questdb.io/docs/guideREST) listening on port `9000` Both the HTTP and PostgreSQL servers reference the database in `/db`. You can connect to the Postgres server as follows. The default password is `quest` ```shell script psql -h localhost -p 8812 -U admin -W -d qdb ``` ## Building from source #### (a) Prerequisites - Java 11 64-bit - Maven 3 - Node.js 12 / NPM 6 ```shell script java --version mvn --version node --version ``` #### (b) Clone the Repository ```shell script git clone git@github.com:questdb/questdb.git ``` #### (c) Build the Code ```shell script cd questdb mvn clean package -DskipTests ``` The build should take around 2 minutes. You can remove `-DskipTests` to run the 3000+ unit tests. The tests take 3-5 minutes to run. #### (d) Run QuestDB ```shell script # Create a database root directory and run QuestDB mkdir java -p core/target/core-5.0.2-SNAPSHOT.jar -m io.questdb/io.questdb.ServerMain -d ``` ## Resources Complete references are available in the [Documentation](https://questdb.io/docs/documentationOverview). There are also several guides to get started. Quick-start guides: - [Docker](https://questdb.io/docs/guideDocker) - [Homebrew](https://questdb.io/docs/guideHomebrew) - [Using the binaries](https://questdb.io/docs/guideBinaries) Usage guides: - [Web Console](https://questdb.io/docs/usingWebConsole) - [Postgres Wire with PSQL](https://questdb.io/docs/guidePSQL) (alpha) - [REST API](https://questdb.io/docs/guideREST) - [CRUD operations](https://questdb.io/docs/crudOperations) Concepts: - [SQL extensions](https://questdb.io/docs/sqlExtensions) - [Storage model](https://questdb.io/docs/storageModel) - [Partitions](https://questdb.io/docs/partitions) - [Designated timestamp](https://questdb.io/docs/designatedTimestamp) ## Support / Contact [Slack Channel](https://join.slack.com/t/questdb/shared_invite/enQtNzk4Nzg4Mjc2MTE2LTEzZThjMzliMjUzMTBmYzVjYWNmM2UyNWJmNDdkMDYyZmE0ZDliZTQxN2EzNzk5MDE3Zjc1ZmJiZmFiZTIwMGY) ## Roadmap [Our roadmap is here](https://github.com/questdb/questdb/projects/3) ## Contribution Feel free to contribute to the project by forking the repository and submitting pull requests. Please make sure you have read our [contributing guide](https://github.com/questdb/questdb/blob/master/CONTRIBUTING.md). ## Contributors ✨ Thanks to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

clickingbuttons

💻 🤔 📓

ideoma

💻 📓 ⚠️

tonytamwk

💻 📓

sirinath

🤔

igor-suhorukov

💻 🤔

mick2004

💻 📦
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!