/questdb

An open source SQL database designed to process time-series data, faster

Primary LanguageJavaApache License 2.0Apache-2.0

All Contributors

What is QuestDB

QuestDB is an open-source NewSQL relational database designed to process time-series data, faster. Our approach comes from low-latency trading; QuestDB’s stack is engineered from scratch, zero-GC Java and dependency-free.

QuestDB ingests data via HTTP, PostgreSQL wire protocol, Influx line protocol or directly from Java. Reading data is done using SQL via HTTP, PostgreSQL wire protocol or via Java API. The whole database and console fits in a 3.5Mb package.

Project goals

  • Treat time-series as first class citizen within a relational database framework.

  • Minimise hardware resources through software optimisation. Don’t waste CPU cycles, memory nor storage.

  • Be a reliable and trustworthy store of critical data.

  • Low friction operation. Empower developers with SQL. Simplify every database interaction.

  • Operate efficiently at both extremes: allow users to prioritise performance over data loss, and vice versa.

  • Be both embedded and standalone.

Getting Started

See our My First Database tutorial. The easiest way to get started is to play with our web console. This will allow you to import and query data using an intuitive interface.

You may also take a look at our storage model. In short, we are a column-oriented database, which partitions data by time intervals.

You can find our documentation here

Support / Contact

Roadmap

Our roadmap is here

Building from source

Pre-requisites

  • Operating system - x86-64: Windows, Linux, FreeBSD and OSX / ARM (AArch64/A64): Linux
  • Java 8 64-bit. We recommend Oracle Java 8, but OpenJDK8 will also work (although a little slower)
  • Maven 3 (from your package manager on Linux / OSX (Homebrew) or from the jar for any OS)
  • Node.js 12 / npm 6 (to manage your Node.js versions we recommend nvm for OSX/Linux/windows WSL, and nvm-windows for Windows) - OPTIONAL

Java versions above 8 are not yet supported. It is possible to build QuestDB with Java 11, but this requires backward incompatible changes. If your java version is above 8 you can download & install JDK8 and use the absolute path to the java executable instead of "java".

Building & Running

git clone git@github.com:questdb/questdb.git
cd questdb

# Check the java version, the output should be similar to:
#
# java version "1.8.0_212"
# Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
# Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)
java -version

# remove 'skipTests' if you want to run all tests (3000+ unit tests, 3-5 mins)
mvn clean package -DskipTests

# replace <root_dir> with the actual directory name, example "out"
mkdir <root_dir>

java -cp core/target/core-4.2.1-SNAPSHOT.jar io.questdb.ServerMain -d <root_dir>

QuestDB will start an HTTP server with the web console available at localhost:9000. Additionally, a PostgreSQL server will be started and available on port 8812, the default login credentials are admin/quest. Both the HTTP and PostresSQL servers reference the database in <root_directory>/db.

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.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


clickingbuttons

💻 🤔 📓

Suminda Sirinath Salpitikorala Dharmasena

🤔

tonytamwk

💻 📓

Alex Pelagenko

💻 📓 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!