Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework to summarize all fingerprind_id of a specific hash #3

Open
glennfawcett opened this issue Feb 5, 2024 · 0 comments
Open

Rework to summarize all fingerprind_id of a specific hash #3

glennfawcett opened this issue Feb 5, 2024 · 0 comments

Comments

@glennfawcett
Copy link
Collaborator

glennfawcett commented Feb 5, 2024

fingerprint_id is created by hashing the query (with constants redacted), its database, its failure status, and if it was part of an implicit txn.

Also, create a failed SQL report where metadata->>'failed' = true

SELECT aggregated_ts, plan_hash, fingerprint_id, metadata->>'failed', metadata->>'implicitTxn' ,metadata->>'query'
FROM crdb_internal.statement_statistics
WHERE metadata->>'failed' = 'true';

      aggregated_ts      |     plan_hash      |   fingerprint_id   | ?column? | ?column? |                                                                       ?column?
-------------------------+--------------------+--------------------+----------+----------+-------------------------------------------------------------------------------------------------------------------------------------------------------
  2024-01-30 20:00:00+00 | \x94be665b9879a0f9 | \x75bbf71bfb239797 | true     | false    | SELECT "timestamp", "eventType", "reportingID", info, "uniqueID" FROM system.eventlog ORDER BY "timestamp" DESC LIMIT $1
  2024-01-30 21:00:00+00 | \x626b5df8bc8360b6 | \xadf15b33997f17ac | true     | true     | INSERT INTO measure(device_id, customer_id, measured_value, measured_data) VALUES (_, _, __more1_10__) RETURNING id
  2024-01-30 20:00:00+00 | \xb23ecb8722812436 | \x51def4b9bce6ea85 | true     | true     | INSERT INTO measure(device_id, customer_id, measured_value, measured_data, measure_notes) VALUES (_, _, __more1_10__), (__more10_100__) RETURNING id
  2024-01-30 20:00:00+00 | \xad75bca7ac35f8ac | \x07d8b19edb67cd7f | true     | true     | INSERT INTO measure(device_id, customer_id, measured_value, measured_data, measure_notes) VALUES (_, _, __more1_10__), (__more100__) RETURNING id
(4 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant