QuestDB introduces a data type called
SYMBOL; a data structure used to store
repetitive strings. Internally,
SYMBOL types are stored as a table of integers
and their corresponding string values.
- Greatly improved query performance as string operations compare and write
inttypes instead of
- Greatly improved storage efficiency as
- Unobtrusive to the user because SQL execution has the same result as handling string values.
- Reduced complexity of database schemas by removing the need for explicit additional tables or joins.
Columns can be specified as
SYMBOL during table creation similar to other
Symbols may also be indexed for faster query execution:
- Symbol tables are stored separately from column data.
- Fast conversion from
intand vice-versa when reading or writing data.
- Columns defined as
symboltypes support indexing.
- Users may configure QuestDB to store
symboltypes in memory for improved query speed (see the