Visit our new documentation site! This documentation page is no longer updated.

Presto Query Signatures

You can view query signatures from the Presto Utilization dashboard and use the query signatures to identify and group similar queries.

Untitled-3
The Presto Utilization dashboard is available upon request for most customers. However, availability for customers in Japan is still pending and will occur soon.

Table of Contents

Overview

Presto query signatures are clusters of Presto queries share common SQL statements. Similar jobs, jobs with only a few differences (such as the date range computed), are grouped together. You can then analyze the clusters of queries and determine which queries require the most or least resources in a given month.

The Presto Query Details table, which is posted on the Presto Utilization dashboard, includes a table column: Query Names or Signature.

Query Signature Definitions for Common Letters

The following list defines common query letters that help to decipher the query that the query signature represents:

  • S: Select
  • S[* ] means SELECT * is used (retrieving all columns. This argument might be inefficient because our storage is columnar format.)
  • Cnt: count(x)
  • CntD: count(distinct x) (If query has this signature, it means a single node process = slow!)
  • T: table
  • G: Group by
  • J: Join
  • O: Order by (single node process = slow!)
  • L: Limit
  • CT: Create table
  • I: Insert Into
  • DT: Delete table
  • D: Delete
  • E: Duplicate Elimination (select distinct, union, etc.)
  • U: Union All
  • E(U(…)): Union (with duplicate elimination)
Untitled-3
Query Signatures are subject to change in the future

Examples

The following example shows SQL statements mapped to query signatures:

select 1                          S(V)

select * from t                   S[*](T) t->#
insert into A select * from B     I(S[*](T)) B->A
select * from t, 'query'          S[*](T)

select * from t, 'table'          t->#

Last modified: Apr 25 2018 16:42:28 UTC

If this article is incorrect or outdated, or omits critical information, let us know. For all other issues, access our support channels.