Questions tagged [questdb]
QuestDB is a high-performance, open-source SQL database used in financial services, IoT, machine learning, DevOps and observability.
214
questions
1
vote
3
answers
61
views
Read UTC timestamp from questdb with pg module. Date object has wrong UTC time
All the timestamps in the questdb are UTC times but when I read them with the nodejs questdb client it will give me the correct time but with my local timezone.
For example, in the database a time of ...
0
votes
1
answer
22
views
QuestDb Web Console Path for Application Load Balancer
I have set up QuestDb pod in AWS EKS. I have ALB to EKS mapped.
I want to know what to use for QuestDb's ALB Listener path
I tried searching it on the internet but all I found was just /
It's not ...
1
vote
1
answer
20
views
QuestDB Use result of SELECT MIN (...) in WHERE
I would like to do something like this:
select *
from some_table t
where t.ts >= (select min(ts) from other_table)
and t.ts <= (select max(ts) from other_table)
Is this somehow possible? I ...
0
votes
2
answers
43
views
Select distinct by one column ordered by time
I have this table:
ID
ParentNumber
ObjectNumber
Start
Component
...
4b8cf664-0ef9-44b2-a266-6c27079b90ed
2
1
2023-08-10T12:50:03.716000Z
1
...
92847bf9-dbfc-46ff-a9bb-b2210df66507
2
1
2023-08-11T17:...
0
votes
1
answer
57
views
How to increase query performance in QuestDB? Will qdb index help or should I use something instead WITH keyword?
I have a QuestDB database with 3 tables.
Table Foo - 15 columns
Table Bar - 30 columns
Table Baz - 23 columns
Most columns are string or long data types. All tables are partitioned by DAY.
40 days ...
0
votes
1
answer
27
views
How to stream large results sets from QuestDB to java application?
I have an issue with PG Driver in Java. Usually I need to stream around 50-60 million rows from db to my java application, however (internally) the PG Driver creates a lot of garbage and all the ...
1
vote
3
answers
108
views
Is symbol type compressed or indexed in Kdb+?
The official doc already showed that symbol is an atomic, but does this feature utilized for compressing or indexing ?
What we can know is that, in QuestDB, the symbol type is compressed and indexed, &...
1
vote
2
answers
61
views
In questDB retrieve the record which is having the closest to range of timestamps
I am new to QuestDB, and I think basic SQL commands run on it.
I want a scenario where input is 5 timestamps (say T1,T2,T3...T5) in a single query I want to get the result from DB where timestamp is ...
0
votes
0
answers
67
views
QuestDB ILP - An existing connection was forcibly closed by the remote host
I'm entering data on questDB via ILP, from time to time the application stops entering data, giving me this error:
System.IO.IOException: Unable to write data to the transport connection: An existing ...
1
vote
1
answer
96
views
Is it possible to SAMPLE BY any timestamp column in QuestDB?
All SAMPLE BY examples at https://questdb.io/docs/reference/sql/sample-by/ use the designated timestamp column of a table.
Is it possible to use a different column ?
1
vote
1
answer
41
views
questDB 7.1.1 java.lang.UnsupportedOperationException
I am trying one of the latest features of QuestDB (v7.1.1).
Connecting to questdb using Npgsql in C#: the request SELECT * FROM table_partitions('F-WWCT_adc')
does not work and the log report i.q.c.p....
1
vote
2
answers
87
views
Does QuestDB cache query results?
Are query results cached in QuestDB ?
What does i.q.c.p.PGConnectionContext query cache used [fd=34248] appearing in logs mean ?
When I'm running
SELECT colX FROM (SUBQUERY)
for the first time it ...
0
votes
1
answer
79
views
Read-only user for Grafana when connecting to QuestDB
I have a Grafana dashboard connected to QuestDB to visualise low-latency data from cryptocurrency.
I would like to set the user as read-only, but it seems QuestDB is postgresql compatible only for ...
0
votes
1
answer
86
views
SAMPLE BY and FILL to generate intervals between two arbitrary dates [closed]
I have a table with some data in QuestDB. If I want to downsample by day and interpolate empty rows for the days where I have no data I can do it via
SELECT timestamp, AVG(energy) AS energy FROM ...
1
vote
1
answer
151
views
How do I tune symbol column capacity in QuestDB?
Say, I have a symbol column with 1M unique values and 10M rows per day and I want to add an index for that column.
How do I tune symbol and index capacity to make sure that QuestDB performance is ...
2
votes
1
answer
119
views
How do I import single-line CSV into QuestDB?
I'm trying to import a table into QuestDB via the /imp REST endpoint. The file contains a single row one with no column row:
a,10.5,True
I'm trying to import it with cURL:
curl -v -F [email protected] '...
1
vote
1
answer
46
views
Questdb docker StaticContentProcessor [106] not found
I'm running questdb via docker on Linux (Ubuntu)
sudo docker run -p 9000:9000 questdb/questdb
and want to record some price data in python: from cryptofeed I use the example
https://github.com/...
0
votes
1
answer
61
views
saving questdb database on an external disk
I don't have enough space on my computer so I am trying to create a questdb on an external hard drive. Is there a way I can do this?
I am looking at the documentation and going through ~/.questdb/conf ...
-1
votes
1
answer
117
views
Create a table by putting data from psycopg2 on QuestDB
Can QuestDB create a table by putting data from psycopg2 in it?
I want to initial table using psycopg2
0
votes
1
answer
59
views
How To Use REINDEX in QuestDB?
I'm testing REINDEX operation of QuestDB in the localhost:9000 Web Console.
But there continuously comes error:
[23:12:14] Cannot lock table: /usr/local/var/questdb/db/my_table
Here is my code:
drop ...
1
vote
1
answer
272
views
How to get data from questdb and get it in a js file? [closed]
Description:
Implement a ZoomingAndScrolling chart with infinite scrolling capability.
Set up a new project on CodeSandbox, using the template from the following link
https://js.devexpress.com/Demos/...
1
vote
1
answer
85
views
What's the best way to upload an ILP file into QuestDB? [closed]
I have a text file in ILP format that I would like to import into QuestDB.
I know QuestDB can ingest data in ILP format, but it seems you can do this only line by line. I have tried using the HTTP ...
1
vote
1
answer
81
views
Finding the initial sampled time window after using SAMPLE BY again
I can't seem to find a perhaps easy solution to what I'm trying to accomplish here, using SQL and, more importantly, QuestDB. I also find it hard to put my exact question into words so bear with me.
...
0
votes
1
answer
91
views
"Not Found" problem with QuestDB behind NGINX
I am running a QuestDB 6.6.1-server. Now I want to increase the protection of this server and put the web gui behind an NGINX reverse proxy as described in QuestDB blog post where setting up basic ...
1
vote
1
answer
92
views
How can I output values for time intervals with no data in QuestDB
I am using QuestDB to get the amount of events we are receiving every 500 milliseconds. Everything works as expected and I can use SAMPLE BY 500T to aggregate in half a second intervals.
However, for ...
1
vote
1
answer
63
views
Why is QuestDB using more memory than allocated?
We've been looking at memory for capacity planning and have a Helm-deployed 8GB-limited QuestDB instance running on one of our k8s clusters.
We recently began scraping metrics off of it. I'm trying to ...
1
vote
1
answer
156
views
Why is QuestDB not showing me the data I just ingested?
I am streaming data into QuestDB using the ILP protocol with one of their official clients. I would expect to see the data available immediately after sending, but that's not the case.
If I go to the ...
1
vote
1
answer
127
views
Can we use Tortoise ORM (Python) for QuestDB?
I want to use QuestDB with Tortoise ORM in my python app. Are the connection params same as a basic PostgreSQL connection?
I want to connect DB like this -
await Tortoise.init({db_url=DATABASE_URL, ...
0
votes
0
answers
50
views
Backup of QuestDB failing
After having failed doing a 'backup database' in QuestDB because of storage shortage I am not able to run backups at all anymore, despite now having enough storage for it.
Logfile shows this:
2022-12-...
1
vote
1
answer
74
views
Error "io.questdb.cairo.CairoException: [2] could not open read-write [file=<dir>/_tab_index.d]"
Currently, I am testing QuestDB in a Apache Camel / Spring Boot scenario for our project. I set up a custom Camel component and a configuration bean holding the connection properties. As far as I can ...
0
votes
1
answer
53
views
extremely high SSD write rate with multiple concurrent writers
I'm using QuestDB as backend for storing collected data using the same script for different data sources.
My problem ist the extremly high disk (ssd) usage. During 4 days it has written 335MB per ...
-1
votes
1
answer
78
views
How to configure QuestDB in embedded mode? [closed]
The embedded mode only gives a DefaultCairoConfiguration which is completely different from server.conf, is there a proper way to configure embedded QuestDB in Java application?
0
votes
1
answer
60
views
How to use Python api respose inseredt to questdb
How can i get Python script to insert this to quest DB
b"[{'timeStamp': '2019-02-01T01:00:00', 'value': 1794.0}, {'timeStamp': '2019-03-01T01:00:00', 'value': 1486.0}, {'timeStamp': '2019-04-...
0
votes
1
answer
55
views
Flyway and QuestDB: unknown function name: EXISTS(CURSOR)
I am trying to run Flyway migrations scripts on QuestDB.
When I run it I get the following error:
ERROR: unknown function name: EXISTS(CURSOR)
I see from the logs that it sends this query to QuestDB ...
3
votes
3
answers
355
views
Exporting data from mysql RDS for import into questDb
I've got a big table (~500m rows) in mysql RDS and I need to export specific columns from it to csv, to enable import into questDb.
Normally I'd use into outfile but this isn't supported on RDS as ...
0
votes
1
answer
44
views
QuestDB installation on a VPS web infrastructure newbie - moving
I have a fx vol model which I have written in python / questdb on my local machine. The standalone model works as an application in my machine and I also have lots of feeds written which are ...
0
votes
3
answers
63
views
Why do I see read-write error message when creating a table or inserting rows?
I keep getting a "could not open read-write messages" when creating a table or inserting rows?
2022-10-21T17:27:11.336011Z I i.q.c.l.t.LineTcpMeasurementScheduler could not create table [...
-1
votes
1
answer
68
views
Separate Domain Model from Time Series Data? [closed]
In a scenario where you have a rather complex domain model (20+ interliked tables) and a lot of time series data (multiple TB, references to the domain model), would you use two different DBMS, one to ...
-1
votes
1
answer
49
views
What is the TRUNCATE TABLE command in QuestDB? [duplicate]
In the documentation it says
TRUNCATE TABLE is used to permanently delete the contents of a table without deleting the table itself.
Can anyone please give an example of it?
0
votes
0
answers
30
views
DROP TABLE command failed in XFS filesystem
I am running QuestDB 6.5.2 on a virtual machine running CentOS 7.9.2009 64 bit OS having XFS filesystem. Whenever I am trying to run DROP TABLE 'sensors'; command both in web console and psql terminal,...
2
votes
1
answer
52
views
Repeat the same filter avoiding the UNION ALL clause
I would like to filter my data within a time interval but in consecutive days for a determined amount of days.
I know I can achieve that using
select insert_datetime from table WHERE insert_datetime ...
1
vote
1
answer
179
views
How to use Touch () functions? [closed]
I would like to know how to use Touch functions for Tables in QuestDB SQL? It would be great if an example is provided for the same!
0
votes
1
answer
98
views
Python QuestDB - embed a function call in a query - HTTP REST API
Using SQL query within the console:
select * from trades_one where traded_ts > dateadd('d', -1, now());
OK
Using HTTP REST API
q = "select traded_price,"\
" limit_price,"\
...
0
votes
4
answers
154
views
What is LATEST_ON syntax in QuestDB?
I'm using QuestDB and SQL for the first time, and I stumbled upon the LATEST_ON syntax used in QuestDB. Can someone explain it's usage and where to use it?
0
votes
2
answers
159
views
Why single quote escape cannot be used in QuestDB, Error: dangling expression
I'm trying to use Query Variables in Grafana, the panel query source is PostgreSQL for QuestDB.
I have added the variable without any issue, but I'm unable to use the variable in Panel query since the ...
0
votes
3
answers
150
views
Escaping single quote in questDB using Python3
I'm trying to insert a row with a string containing a single quote symbol into a QuestDB table. I tried using the following code below as well as the following SQL query using the console. Both gave ...
0
votes
1
answer
244
views
Timestamps in QuestDB Python time.time() Not working
ı am building a database in QuestDB.
ı set up a table and one column is timestamp.
docs about table = https://questdb.io/docs/guides/working-with-timestamps-timezones/
timestamp column is converting ...
0
votes
1
answer
136
views
QuestDB: Partition by week
Is there a way to partition tables by week in QuestDB? The QuestDB documentation shows NONE, YEAR, MONTH, DAY, and HOUR.
1
vote
1
answer
502
views
Ambiguous column name when using alias in join
Why does this query produce an "Ambiguous column name" error when I include the "as time" alias? If I remove "as time" or "SAMPLE BY 1d", it goes away.
SELECT a....
0
votes
2
answers
260
views
Grafana timestamp macro to use with QuestDB
Grafana $__timeFilter(timestamp) macro generates nanosecond precision (for some reason, only on the alert queries, still trying to work out why). QuestDB accepts either epoch microseconds or ISO ...