Page tree
Skip to end of metadata
Go to start of metadata

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

The Presto Utilization dashboard is available upon request for most customers.

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

Query Signatures are subject to change. 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)

Examples

The following example shows SQL statements mapped to query signatures:

SELECT 1

S(V)

SELECT * FROM t

S * t - > #

INSERT INTO A SELECT * FROM B

B I(
S *
) B - > A

SELECT * FROM t, ‘query’

S[*](T)

SELECT * FROM t, ‘table’

t - > #


  • No labels