DEV Community

asaf g
asaf g

Posted on • Originally published at turtle-techies.com on

Checking Out Quest DB

What is Quest DB?

QuestDB is an open-source Time Series database that uses a column-oriented storage approach and vectored execution for simple and extremely quick query execution.

It was developed by QuestDB Limited in 2014.

It is written in Java and supports Linux, macOS and Windows as the server operating system.

The query language utilized for QuestDB is SQL (Structured Query Language) alongside its expansion for time series-analysis.

QuestDB depends on the relational data model, normally found in some of the popular relational databases like PostgreSQL, MySQL, SQL Server, Oracle, and so forth which means that each time-series estimation is recorded in its row, with a time field followed by other fields.

Features

Some of the best features of QuestDB are as follows.

  • Time series database with a relational data model.
  • SIMD optimized analytics
  • Uses column-oriented storage technologies with each column stored continuously in sequential blocks
  • It allows columns to be chosen as a designated timestamp to utilize it’s high-performance time series functions
  • Comes with a built-in SQL optimizer
  • InfluxDB line and Postgres wire protocol support
  • Supports time series and relational joins
  • It supports horizontal partitioning (by timestamps)
  • Supports ACID

The setting up of QuestDB can be done easily by following the QuestDB documentation.

It runs on port 9000 (by default) and provides a web console to interact with the database. The web console has a schema/table browser, query tool and visualization window where the query results can be shown either in tabular form or using graphs.

Here is how the web console looks like:

QuestDB web console

How to setup QuestDB

If like me, you want to setup QuestDB for learning or for a development environment, I would recommend using Docker.
Here are the instructions I used:
https://questdb.io/docs/packages/docker/

Your other options are:

  1. Using binaries:
    For setting up QuestDB using binaries, you can refer to QuestDB's documentation https://questdb.io/docs/packages/binaries/ .

  2. Homebrew:
    For macOS users, QuestDB is available via Homebrew https://questdb.io/docs/packages/homebrew/ .

Why should you choose QuestDB?

The one thing I like most about QuestDB is that despite the fact that its engineering is planned from the ground up to be close to the hardware.
It offers advanced execution and is additionally centered around making it simpler for designers to integrate and query.

Following are the reasons you should choose QuestDB

Easy to set up and use

QuestDB is a lightweight open-source database and is anything but difficult to set up without any conditions.
It will take just a couple of minutes to download and you can begin playing with it.
Its official website provides detailed technical documentation which makes installation, configuration and running the database very simple.
Its web console enables us to perform real-time analytics with easy visualization using different types of charts like bar, line area etc.

Supports SQL

One reason for utilizing QuestDB is its SQL-like query language.
On the off chance that you know about SQL, utilizing QuestDB would be simpler as it depends on SQL with its very time-series alterations.

Performance

Execution is one of the fundamental rules that ought to be thought of while picking the database.
QuestDB offers better execution while managing time-series data like data from IoT gadgets, stock value information and DevOps measurements.
For a database that is new in the TSDB field, it gives seemingly preferable execution over other entrenched time-series databases.

Why QuestDB is not a good choice?

New to the TSDB ecosystem

QuestDB is a less mature product than other time-series databases like TimescaleDB and InfluxDB, which implies that there are a ton of integrations and features that are yet to be worked from the developers' side.
So if you are searching for a well established time-series database with an extraordinary help network and discussion, QuestDB isn't there yet.

OLTP Support

OLTP databases require frequent inserts, updates, and deletes with user-defined constraints to be kept up.
If you are intending to utilize a database that likewise supports Online Transaction Processing, QuestDB is not a solid match.

How does it compare with other databases?

QuestDB vs SQL Databases

QuestDB is like a SQL database (MySQL, Oracle, PostgreSQL) however unique from multiple points of view.

Other relational databases can also handle time-series data but they tend to offer worse performance while dealing with common time-series operations like real-time aggregations of data.

On the other hand, QuestDB is purpose-built for fast storage and processing of time series data.
The data model followed by QuestDB is a relational data model which means that data is stored in a table and each row in a table represents a collection of related values.
It also follows the ACID property and supports joins like relational databases but does not allow user-defined constraints and triggers.

Alternatives to QuestDB

Some of the best alternatives to QuestDB are as follows

InfluxDB

InfluxDB is an open-source time-series database designed for high-availability storage and retrieval of data.

It is a part of the TICK (Telegraf, InfluxDB, Chronograf, Kapacitor) stack and has a non-relational, NoSQL data model. It has SQL-like query language to handle interactions with the data

TimescaleDB

Built on the top of the Postgres database, TImescaleDB is optimized for fast ingest and complex queries with full SQL support like traditional relational databases.

KDB+

KDB+ is also a high performance column-store relational time-series database with in-memory abilities.

It is commonly used to store, analyze and process high-frequency financial time series data.

I hope you enjoyed, and of course as always, feel free to comment or share.

Thank you for reading.

Top comments (0)