查询历史记录Query history

重要

此功能目前以公共预览版提供。This feature is in Public Preview. 请联系 Azure Databricks 代表,以申请访问权限。Contact your Azure Databricks representative to request access.

查询历史记录显示使用 SQL 终结点执行的 SQL 查询。The query history shows SQL queries performed using SQL endpoints.

你可以使用此屏幕提供的信息来帮助调试查询问题。You can use the information available through this screen to help you debug issues with queries.

此部分介绍如何通过 UI 来处理查询历史。This section describes how to work with query history using the UI. 若要使用 API 处理查询历史记录,请参阅查询历史记录 APITo work with query history using the API, see Query History API.

查看查询历史记录View query history

若要查看查询历史记录,请执行以下操作之一:To view query history, do one of the following:

  • 单击Click the 历史记录图标 “模型”图标。icon in the sidebar.
  • 单击侧栏中的 终结点图标 图标。Click the Endpoints Icon icon in the sidebar. 在“操作”列表中,单击垂直省略号 垂直省略号,然后选择“历史记录”。In the Actions column, click the vertical ellipsis Vertical Ellipsis and select History.

你可以按用户、日期范围、终结点类型和查询状态筛选列表。You can filter the list by user, date range, endpoint type, and query status.

查询历史记录Query history

查看查询时间View query time

若要显示查询编译、执行和结果提取所耗时间的可视指示,请将鼠标悬停在“持续时间”列中的条形上。To display a visual indication of the time spent in compilation, execution, and result fetching for a query, hover over the bar in the Duration column.

查询时间Query time

查看查询详细信息View query details

  1. 查看查询历史记录View query history.

  2. 单击“查询”列中的字符串可显示查询详细信息:Click a string in the Query column to display query details:

    查询历史记录详细信息Query history details

  3. 如果命令生成查询计划,请在“详细信息”字段中单击“打开”链接以显示该计划 。If a command generates a query plan, in the Details field click the Open link to display the plan. “打开”链接仅适用于在具有”可以管理”权限的终结点上执行的查询 。The Open link is available only for queries executed on endpoints you have Can Manage permission for.

    查询计划Query plan

查看查询指标View query metrics

  1. 查看查询历史记录View query history.

  2. 单击“查询”列中的字符串以显示查询详细信息。Click a string in the Query column to display query details.

  3. 单击“执行详细信息”选项卡以显示查询指标。Click the Execution Details tab to display query metrics.

    查询指标Query metrics