.show queries, how far back do queries get stored?

Cheah, Felix FC 0 Reputation points
2024-02-05T02:41:57.6233333+00:00

Hi, I'm using the .show queries function to monitor how many times the database gets queried. I've notice there isn't anything before January ( there should be). Does ADX only keep the queries for 1 month? If so, is there a way to extend this time?

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
457 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 23,581 Reputation points Microsoft Employee
    2024-02-05T22:29:45.49+00:00

    Hello Cheah, Felix FC,

    Welcome to the Microsoft Q&A forum.

    ADX uses a retention policy that automatically removes data from tables or materialized views. The retention policy can be configured for a specific table or materialized view, or for an entire database.

    SoftDeletePeriod:

    • Time span for which it's guaranteed that the data is kept available to query. The period is measured starting from the time the data was ingested.
    • Defaults to 100 years.
    • When altering the soft-delete period of a table or database, the new value applies to both existing and new data.

    https://video2.skills-academy.com/en-us/azure/data-explorer/kusto/management/retention-policy#the-policy-object

    If you’re not seeing data before January, it could be due to the retention policy settings for your specific table or database. You can use the

    .show policy retention command to show the current retention policy for a database, table, or materialized view.

    Ex: .show table Table1 policy retention

    https://video2.skills-academy.com/en-us/azure/data-explorer/kusto/management/show-table-retention-policy-command

    I hope this helps.

    2 people found this answer helpful.