QuestDB creates the following file structure in it’s root_directory:

  1. questdb
  2. ├── conf
  3. ├── db
  4. ├── log
  5. └── public

conf directory

Contains configuration files for QuestDB:

  1. ├── conf
  2. ├── date.formats
  3. ├── mime.types
  4. └── server.conf
filedescription
date.formatsA list of date formats in plain text.
mime.typesMapping file used by the HTTP server to map file extension to response type when an user downloads a file.
server.confServer configuration file. Find out more in the server configuration section.

db directory

This directory contains all the files related to database tables. It is organised as follows:

  • Each table has its own table_directory under root_directory/db/table_name
  • Within a table_directory, each partition has its own partition_directory.
  • Within each partition directory, each column has its own column_file, for example mycolumn.d
  • If a given column has an index, then there will also be an index_file, for example mycolumn.k

The table also stores metadata in _meta files:

  1. ├── db
  2. ├── Table
  3. ├── Partition 1
  4. ├── _archive
  5. ├── column1.d
  6. ├── column2.d
  7. ├── column2.k
  8. └── ...
  9. ├── Partition 2
  10. ├── _archive
  11. ├── column1.d
  12. ├── column2.d
  13. ├── column2.k
  14. └── ...
  15. ├── _meta
  16. └── _txn
  17. └── table_1.lock

If the table is not partitioned, data is stored in a directory called default:

  1. ├── db
  2. ├── Table
  3. ├── default
  4. ├── _archive
  5. ├── column1.d
  6. ├── column2.d
  7. ├── column2.k
  8. └── ...
  9. ├── _meta
  10. └── _txn
  11. └── table_1.lock

:::caution

As tempting as it may be to delete partitions by manually removing the directories from the file system, we really discourage this. The partitions are organised with metadata and deleting them directly could corrupt the table. We recommend you use ALTER TABLE DROP PARTITION for this effect.

:::

log directory

Contains the log files for QuestDB:

  1. ├── log
  2. ├── stdout-2020-04-15T11-59-59.txt
  3. └── stdout-2020-04-12T13-31-22.txt

Log files look like this:

  1. 2020-04-15T16:42:32.879970Z I i.q.c.TableReader new transaction [txn=2, transientRowCount=1, fixedRowCount=1, maxTimestamp=1585755801000000, attempts=0]
  2. 2020-04-15T16:42:32.880051Z I i.q.g.FunctionParser call to_timestamp('2020-05-01:15:43:21','yyyy-MM-dd:HH:mm:ss') -> to_timestamp(Ss)
  3. 2020-04-15T16:42:32.880657Z I i.q.c.p.WriterPool >> [table=`table_1`, thread=12]
  4. 2020-04-15T16:42:32.881330Z I i.q.c.AppendMemory truncated and closed [fd=32]
  5. 2020-04-15T16:42:32.881448Z I i.q.c.AppendMemory open /usr/local/var/questdb/db/table_1/2020-05/timestamp.d [fd=32, pageSize=16777216]
  6. 2020-04-15T16:42:32.881708Z I i.q.c.AppendMemory truncated and closed [fd=33]
  7. 2020-04-15T16:42:32.881830Z I i.q.c.AppendMemory open /usr/local/var/questdb/db/table_1/2020-05/temperature.d [fd=33, pageSize=16777216]
  8. 2020-04-15T16:42:32.882092Z I i.q.c.AppendMemory truncated and closed [fd=34]
  9. 2020-04-15T16:42:32.882210Z I i.q.c.AppendMemory open /usr/local/var/questdb/db/table_1/2020-05/humidity.d [fd=34, pageSize=16777216]
  10. 2020-04-15T16:42:32.882248Z I i.q.c.TableWriter switched partition to '/usr/local/var/questdb/db/table_1/2020-05'
  11. 2020-04-15T16:42:32.882571Z I i.q.c.p.WriterPool << [table=`table_1`, thread=12]
  12. 2020-04-15T16:44:33.245144Z I i.q.c.AppendMemory truncated and closed [fd=32]
  13. 2020-04-15T16:44:33.245418Z I i.q.c.AppendMemory truncated and closed [fd=33]
  14. 2020-04-15T16:44:33.245712Z I i.q.c.AppendMemory truncated and closed [fd=34]
  15. 2020-04-15T16:44:33.246096Z I i.q.c.ReadWriteMemory truncated and closed [fd=30]
  16. 2020-04-15T16:44:33.246217Z I i.q.c.ReadOnlyMemory closed [fd=31]
  17. 2020-04-15T16:44:33.246461Z I i.q.c.TableWriter closed 'table_1'
  18. 2020-04-15T16:44:33.246492Z I i.q.c.p.WriterPool closed [table=`table_1`, reason=IDLE, by=12]
  19. 2020-04-15T16:44:33.247184Z I i.q.c.OnePageMemory closed [fd=28]
  20. 2020-04-15T16:44:33.247239Z I i.q.c.ReadOnlyMemory closed [fd=27]
  21. 2020-04-15T16:44:33.247267Z I i.q.c.TableReader closed 'table_1'
  22. 2020-04-15T16:44:33.247287Z I i.q.c.p.ReaderPool closed 'table_1' [at=0:0, reason=IDLE]
  23. 2020-04-15T16:44:39.763406Z I http-server disconnected [ip=127.0.0.1, fd=24]
  24. 2020-04-15T16:44:39.763729Z I i.q.c.h.HttpServer pushed

public directory

Contains the web files for the Web Console:

  1. └── public
  2. ├── assets
  3. ├── console-configuration.json
  4. └── favicon.png
  5. ├── index.html
  6. ├── qdb.js
  7. ├── qdb.css
  8. └── ...