Blog Post

Azure Data Explorer Blog
1 MIN READ

How to extend ".show queries" history?

Tzvia's avatar
Tzvia
Icon for Microsoft rankMicrosoft
Feb 03, 2019

The data is kept by for the last 30 days.

if:

  • you require accessing earlier information about queries

and

  • that does not conflict with any security/compliance considerations users of your cluster may have

then:

  • you can periodically export the data (using “.show queries”) and store it elsewhere (e.g. in a Kusto table in your database, using “.set-or-append” commands)
set-or-append async history with(tags='["ingest-by:myTag"]', ingestIfNotExists='["myTag"]') <| 
   .show queries

async command will return immediately with an operation ID - a guid - which you can use for periodically polling for the operation's status (using ".show operations <guid>").

 

.show operations 71af658a-c2e7-4e0a-97bc-79643b12478a

Updated Feb 20, 2019
Version 4.0

1 Comment

  • Awesome this. 

    How can we also have the result/answerset for the queries we ran?