I found two tables, query_execution and query, in Metabase. 'query_execution' table shows the query log as start time, running time, card_id , executor_id, 'query' table shows the average execution time for the query ; Two tables are linked by the hash field.
Question 1: What is the mechanism for generating the hash field? For example
- For a created card, if the query sql of the card is modified, such as modify filter parameters or replace the SQL with another, will the hash value change?
- For a temporary query, if the same SQL statement is executed at two different times, will the hash field are the same one?
Question 2: The query table records the average execution time of the query. What is the time range for calculating this average execution time? Is it from the start time when the query is created or within the last month, etc.?