Query Results for CMDB Query Builder
- How is the data stored in the query results table ?
- How long is the data stored ?
- Is there any clean up activity on the query results table ?
- Whenever a query is executed on the CMDB Query Builder, a result set is created and is populated in the query result table with a sys_id associated to it as below
- Every unique query execution, creates a new sys_id and associated the result set to that sys_id and stores it in the query result table.
- The data in the query results table associated with any sys_id is stored for 24 hours.
- When the same query gets executed again and again before 24 hours, the count of the records for each execution gets o the already existing count.
For example, when a query is executed at 9 AM today and the record count is 10 upon first execution. If the query is run 10 times till 8:59 AM tomorrow, the record count would be 100 (10*10) in the query results table for that sys_id.
- A Scheduled job "CMDB Query Builder query results clean u" runs every day which cleans up the data from the query results table, which is more than 24 hours old.
- So, as per the above example, post ~9 AM the next day, the 100 records from the query results table associated to that sys_id gets cleaned up and the record count would be zero until further execution of the query on that particular day.