Title
#users-public
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 6:43 AM
Hi @Zahlii. Are these async queries executed using one or many connections ? If it's the former then pg wire doesn't support it (interleaving transactions over one connection) and it could be that one query is messing up the other .
6:56 AM
Hmm, what does
select systimestamp()
return ?
6:58 AM
What if you alter the second query a bit (e.g. add unneeded alias) and run it again ?
7:00 AM
Are you running latest (6.5) ?
z

Zahlii

08/22/2022, 7:01 AM
If I filter with the date as a string inside the query, it works as expected
7:01 AM
Can I check the version with a query? But yes, I use the latest docker image
7:01 AM
questdb/questdb latest 302e1bbc43cc 2 weeks ago 134MB
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 7:01 AM
If you're using web console then version should be visible in bottom right corner.
z

Zahlii

08/22/2022, 7:02 AM
Nope, using postgre via TablePlus
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 7:03 AM
Right. Could you open a GH issue and include table schema, inserts and query ?
z

Zahlii

08/22/2022, 7:03 AM
I can try this evening if I can reproduce this on small scale, as table is pretty big already
7:04 AM
Guess I can just do the calculation on my side, and adjust the quer to query by the string date value
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 7:08 AM
Is sensor_time a designated timestamp and is weather_data partitioned?
z

Zahlii

08/22/2022, 7:20 AM
Yes, and yes by year
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 7:36 AM
Hey @Zahlii. I managed to reproduce and created https://github.com/questdb/questdb/issues/2447 .
z

Zahlii

08/22/2022, 7:48 AM
Thanks for digging into this! Was on the verge of questioning my sanity ...
Bolek Ziobrowski

Bolek Ziobrowski

08/22/2022, 7:52 AM
"... for when you gaze long into the SQL. The SQL gazes also into you."
7:54 AM
@Zahlii I did some checks and first thing I can recommend is to use now() instead of systimestamp() function . The latter returns different value for each call/row and disables interval optimizations . There should be a big red warning on https://questdb.io/docs/reference/function/date-time/ .