Hi!
I would like to know if QuestDB can be used as logs storage - and if I can query Json documents.
Consider a table with two fields (date_time is a timestamp, and json_field is a JsonB or whatever).
For example, if I store the following json document:
{ ‘message’: ‘user logged in’, ‘username’: ‘edson’}
can I query something like
Select * from logs where json_field->>‘username’ = ‘edson’ and date_and_time >= ‘2024-07-01’
Also, how efficient is QuestDB for logs storage? Does it compress data?
Hi @Edson_Richter ,
Next release (imminent!) will allow you to extract and query fields from JSON documents, stored inside VARCHAR columns: feat(sql): new `json_extract` function to extract JSON fields from varchars by amunra · Pull Request #4633 · questdb/questdb · GitHub
To compress data, you can use ZFS: Enable compression with ZFS | QuestDB
We are working on supporting Parquet for both internal and external files, which will add native compression to QuestDB.
That’s awesome! Both are critical for our scenario.
Out of interest, what is your use case? Could you give us some more insights into what you are up to, and the scale of it?
Hi @Edson_Richter , just following up on this, 8.0.3 is out: Releases · questdb/questdb · GitHub
Let us know how you get on with the json_extract
function