Skip to content

Commit

Permalink
nph fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivansete-status committed Mar 1, 2025
1 parent ce9bafe commit 1610e78
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions waku/common/databases/db_postgres/query_metrics.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ const QueriesToMetricMap* = {
"contentTopic IN": "content_topic",
"SELECT version()": "select_version",
"WITH min_timestamp": "messages_lookup",
"SELECT messageHash FROM messages WHERE pubsubTopic = ? AND timestamp >= ? AND timestamp <= ? ORDER BY timestamp DESC, messageHash DESC LIMIT ?": "msg_hash_no_ctopic",
"SELECT messageHash FROM messages WHERE pubsubTopic = ? AND timestamp >= ? AND timestamp <= ? ORDER BY timestamp DESC, messageHash DESC LIMIT ?":
"msg_hash_no_ctopic",
"AS partition_name": "get_partitions_list",
"SELECT COUNT(1) FROM messages": "count_msgs",
"SELECT messageHash FROM messages WHERE (timestamp, messageHash) < (?,?) AND pubsubTopic = ? AND timestamp >= ? AND timestamp <= ? ORDER BY timestamp DESC, messageHash DESC LIMIT ?": "msg_hash_with_cursor",
"SELECT messageHash FROM messages WHERE (timestamp, messageHash) < (?,?) AND pubsubTopic = ? AND timestamp >= ? AND timestamp <= ? ORDER BY timestamp DESC, messageHash DESC LIMIT ?":
"msg_hash_with_cursor",
"SELECT pg_database_size(current_database())": "get_database_size",
"DELETE FROM messages_lookup WHERE timestamp": "delete_from_msgs_lookup",
"DROP TABLE messages_": "drop_partition_table",
"ALTER TABLE messages DETACH PARTITION": "detach_partition",
"SELECT pg_size_pretty(pg_total_relation_size(C.oid))": "get_partition_size",
"pg_try_advisory_lock": "try_advisory_lock",
"SELECT messageHash FROM messages ORDER BY timestamp DESC, messageHash DESC LIMIT ?": "get_all_msg_hash",
"SELECT messageHash FROM messages ORDER BY timestamp DESC, messageHash DESC LIMIT ?":
"get_all_msg_hash",
"SELECT pg_advisory_unlock": "advisory_unlock",
"ANALYZE messages": "analyze_messages",
"SELECT EXISTS": "check_version_table_exists"
"SELECT EXISTS": "check_version_table_exists",
}

0 comments on commit 1610e78

Please sign in to comment.