Hello @Gonçalo Antunes,
are you able to share the statistics?
Like this sample:
Also share the raw JSON if possible, like this example:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello!
I'm working with an ADX database, and currently using kusto query language to get the data. The table from where I get the data has a 30 day cache (hot) storage configured, which means that getting data from before that period will be slower, since it is going to cold storage. That's fine.
However, based on results from testing, when querying data from 60 days ago (a) and 120 days ago (b) (24h of data in each test), query (b) is significantly slower - (a) 56 seconds, 2855 records; (b) 94 seconds, 2831 records.
The table structure is defined as: Timestamp (datetime), Key (string), SubKey (string), Data (dynamic).
Both queries were defined as: (a)
TableName | where Timestamp between ( ago(60d) .. ago(59d) ) | where Key == 'key' and SubKey == 'subkey'
(b)
TableName | where Timestamp between ( ago(120d) .. ago(119d) ) | where Key == 'key' and SubKey == 'subkey'
I would like to know the reason behind this differences in query time when going further back in time.
Thanks in advance :)
P.S. Forgot to mention (and it is probably relevant) that when querying data from 240 days ago, although there are no data in that period, the query still took 129.034 seconds, for 0 results.
Hello @Gonçalo Antunes,
are you able to share the statistics?
Like this sample:
Also share the raw JSON if possible, like this example:
Hello @Gonçalo Antunes,
Thanks for running the queries and checking the statistics.
It seems query B (79 seconds for 120 days) is slower than query A (66 seconds for 60 days) which is on par with expectations.
You have to dig deeper into the ADX documentation for detailed background information.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.
@Sander van de Velde thank you for your answer.
Do you think, based on the information provided, that there is something I could do on the query itself to improve the performance, i.e., how could I re-write the queries for them to provide the results faster?
Nevertheless, I will accept the answer, since the response to the first answer was given accordingly :)