{
  "annotations":{"list":[{"builtIn":1,"datasource":{"type":"datasource","uid":"grafana"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","target":{"limit":100,"matchAny":false,"tags":[],"type":"dashboard"},"type":"dashboard"}]},
  "author":"Ruohang Feng (rh@vonng.com)",
  "description":"PostgreSQL Catalog Explorer for Query",
  "editable":true,
  "fiscalYearStartMonth":0,
  "graphTooltip":0,
  "id":null,
  "license":"https://pigsty.io/docs/about/license/",
  "links":[
    { "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Overview"],"targetBlank":false,"title":"Overview","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Cluster"] ,"targetBlank":false,"title":"Cluster" ,"tooltip":"","type":"dashboards","url":"" },
    { "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Instance"],"targetBlank":false,"title":"Instance","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Database"],"targetBlank":false,"title":"Database","tooltip":"","type":"dashboards","url":"" }
  ],
  "panels":[
    {
      "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance : ${ins}","url":"/d/pgsql-instance?var-ins=${ins}&${__url_time_range}"}]}]                                                         },
          { "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Databases : ${cls}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${datname}&${__url_time_range}"}]}]                                },
          { "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"PGSQL Database : ${ins}.${datname}","url":"/d/pgsql-database?var-ins=$ins&var-datname=$datname&${__url_time_range}"}]}]                           },
          { "matcher":{"id":"byFrameRefID","options":"D"},"properties":[{"id":"links","value":[{"title":"PGSQL Query : ${ins}.${datname}.${query}","url":"/d/pgsql-query?var-ins=${ins}&var-datname=${datname}&var-query=${query}&${__url_time_range}"}]}] }
        ]
      },
      "gridPos":{"h":5,"w":6,"x":0,"y":0},
      "id":98,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":16,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Query","type":"string","values":["${query}"]}],"meta":{},"name":""}     ,"hide":false,"refId":"D" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Database","type":"string","values":["${datname}"]}],"meta":{},"name":""},"hide":false,"refId":"C" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Instance","type":"string","values":["$ins"]}],"meta":{},"name":""}      ,"hide":false,"refId":"A" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Cluster","type":"string","values":["${cls}"]}],"meta":{},"name":""}     ,"hide":false,"refId":"B" }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byRegexp","options":"(RT:avg)"},
            "properties":[
              { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
              { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
              { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} }
            ]
          },
          {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-datname=${datname}&var-query=${__data.fields.Query}&${__url_time_range}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
          {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
          {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
          {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width"},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
          {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
          {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
          {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
          {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
        ]
      },
      "gridPos":{"h":5,"w":18,"x":6,"y":0},
      "id":93,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Calls"}]},
      "pluginVersion":"12.3.0",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "expr":"",
          "format":"table",
          "group":[],
          "legendFormat":"__auto",
          "metricColumn":"none",
          "range":true,
          "rawQuery":true,
          "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname'\nORDER BY mean_exec_time DESC\nLIMIT 100;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":false,
              "blk_write_time":false,
              "datname":true,
              "dbid":true,
              "local_blks_dirtied":false,
              "local_blks_hit":false,
              "local_blks_read":false,
              "local_blks_written":false,
              "max_plan_time":false,
              "mean_plan_time":false,
              "min_plan_time":false,
              "plans":false,
              "queryid":true,
              "shared_blks_dirtied":false,
              "shared_blks_hit":false,
              "shared_blks_read":false,
              "shared_blks_written":false,
              "stddev_exec_time":false,
              "stddev_plan_time":false,
              "temp_blk_read_time":false,
              "temp_blk_write_time":false,
              "temp_blks_read":false,
              "temp_blks_written":false,
              "total_plan_time":false,
              "userid":true
            },
            "includeByName":{},
            "indexByName":{
              "calls":9,
              "datname":1,
              "dbid":7,
              "jit_deform_count":48,
              "jit_deform_time":49,
              "jit_emission_count":46,
              "jit_emission_time":47,
              "jit_functions":40,
              "jit_generation_time":41,
              "jit_inlining_count":42,
              "jit_inlining_time":43,
              "jit_optimization_count":44,
              "jit_optimization_time":45,
              "local_blk_read_time":34,
              "local_blk_write_time":35,
              "local_blks_dirtied":32,
              "local_blks_hit":30,
              "local_blks_read":31,
              "local_blks_written":33,
              "max_exec_time":13,
              "max_plan_time":20,
              "mean_exec_time":5,
              "mean_plan_time":18,
              "min_exec_time":14,
              "min_plan_time":19,
              "minmax_stats_since":53,
              "parallel_workers_launched":52,
              "parallel_workers_to_launch":51,
              "plans":16,
              "qid":2,
              "query":3,
              "queryid":8,
              "rolname":4,
              "rows":10,
              "shared_blk_read_time":28,
              "shared_blk_write_time":29,
              "shared_blks_dirtied":26,
              "shared_blks_hit":24,
              "shared_blks_read":25,
              "shared_blks_written":27,
              "stats_since":54,
              "stddev_exec_time":15,
              "stddev_plan_time":21,
              "temp_blk_read_time":38,
              "temp_blk_write_time":39,
              "temp_blks_read":36,
              "temp_blks_written":37,
              "toplevel":0,
              "total_exec_time":12,
              "total_plan_time":17,
              "userid":6,
              "wal_buffers_full":50,
              "wal_bytes":11,
              "wal_fpi":23,
              "wal_records":22
            },
            "renameByName":{
              "blk_read_time":"Blk RTime",
              "blk_write_time":"TBlk WTime",
              "calls":"Calls",
              "datname":"Database",
              "dbid":"DBID",
              "jit_deform_count":"JIT Deform Count",
              "jit_deform_time":"JIT Deform Time",
              "jit_emission_count":"JIT Emission Count",
              "jit_emission_time":"JIT Emission Time",
              "jit_functions":"JIT Functions",
              "jit_generation_time":"JIT Generate Time",
              "jit_inlining_count":"JIT Inline Count",
              "jit_inlining_time":"JIT Inline Time",
              "jit_optimization_count":"JIT Optimize Count",
              "jit_optimization_time":"JIT Optimize Time",
              "local_blk_read_time":"LBlk ReadTime",
              "local_blk_write_time":"LBlk WriteTime",
              "local_blks_dirtied":"LBlks Dirty",
              "local_blks_hit":"LBlks Hit",
              "local_blks_read":"LBlks Read",
              "local_blks_written":"LBlks Write",
              "max_exec_time":"RT:max",
              "max_plan_time":"Plan:max",
              "mean_exec_time":"RT:avg",
              "mean_plan_time":"Plan:avg",
              "min_exec_time":"RT:min",
              "min_plan_time":"Plan:min",
              "minmax_stats_since":"MinMax Stat Since",
              "parallel_workers_launched":"PW Launched",
              "parallel_workers_to_launch":"PW2Launch",
              "plans":"Plan",
              "qid":"Query",
              "query":"SQL",
              "queryid":"QID",
              "rolname":"User",
              "rows":"Rows",
              "shared_blk_read_time":"SBlk ReadTime",
              "shared_blk_write_time":"SBlk WriteTime",
              "shared_blks_dirtied":"SBlks Dirty",
              "shared_blks_hit":"SBlks Hit",
              "shared_blks_read":"SBlks Read",
              "shared_blks_written":"SBlks Write",
              "stats_since":"Stat Since",
              "stddev_exec_time":"RT:\u03c3",
              "stddev_plan_time":"Plan:\u03c3",
              "temp_blk_read_time":"TBlk RTime",
              "temp_blk_write_time":"TBlk WTime",
              "temp_blks_read":"TBlks Read",
              "temp_blks_written":"TBlks Write",
              "toplevel":"Top",
              "total_exec_time":"Time",
              "total_plan_time":"Plan:sum",
              "userid":"UserID",
              "wal_buffers_full":"WAL Buffers Full",
              "wal_bytes":"WAL",
              "wal_fpi":"WAL FPIs",
              "wal_records":"WAL Recs"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"uid":"${dsn}"},
      "description":"Users list that runs this query",
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"rgba(128, 128, 128, 1)","value":0}]}},"overrides":[]},
      "gridPos":{"h":2,"w":12,"x":0,"y":5},
      "id":63,
      "options":{"colorMode":"value","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT array_agg(u.usename)::TEXT\nFROM pg_stat_statements s LEFT OUTER JOIN pg_user u ON s.userid = u.usesysid\nWHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query';",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Users",
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#808080","index":0}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#EAB839","value":1},{"color":"#EF843C","value":2},{"color":"#E24D42","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},"unit":"ms"},
        "overrides":[{"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"unit","value":"locale"}]},{"matcher":{"id":"byName","options":"EXEC: sum"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#808080","value":0},{"color":"#3e668f","value":1e-07}]}}]}]
      },
      "gridPos":{"h":15,"w":2,"x":12,"y":5},
      "id":67,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"titleSize":12,"valueSize":10},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query' ORDER BY calls DESC LIMIT 1;","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":true,
              "blk_write_time":true,
              "calls":false,
              "dbid":true,
              "jit_deform_count":true,
              "jit_deform_time":true,
              "jit_emission_count":true,
              "jit_emission_time":true,
              "jit_functions":true,
              "jit_generation_time":true,
              "jit_inlining_count":true,
              "jit_inlining_time":true,
              "jit_optimization_count":true,
              "jit_optimization_time":true,
              "local_blk_read_time":true,
              "local_blk_write_time":true,
              "local_blks_dirtied":true,
              "local_blks_hit":true,
              "local_blks_read":true,
              "local_blks_written":true,
              "max_exec_time":false,
              "max_plan_time":true,
              "mean_exec_time":false,
              "mean_plan_time":true,
              "min_exec_time":false,
              "min_plan_time":true,
              "minmax_stats_since":true,
              "parallel_workers_launched":true,
              "parallel_workers_to_launch":true,
              "plans":true,
              "query":true,
              "queryid":true,
              "rows":true,
              "shared_blk_read_time":true,
              "shared_blk_write_time":true,
              "shared_blks_dirtied":true,
              "shared_blks_hit":true,
              "shared_blks_read":true,
              "shared_blks_written":true,
              "stats_since":true,
              "stddev_exec_time":false,
              "stddev_plan_time":true,
              "temp_blk_read_time":true,
              "temp_blk_write_time":true,
              "temp_blks_read":true,
              "temp_blks_written":true,
              "toplevel":true,
              "total_exec_time":false,
              "total_plan_time":true,
              "usename":true,
              "userid":true,
              "wal_bytes":true,
              "wal_fpi":true,
              "wal_records":true
            },
            "includeByName":{},
            "indexByName":{
              "blk_read_time":28,
              "blk_write_time":29,
              "calls":11,
              "dbid":1,
              "local_blks_dirtied":24,
              "local_blks_hit":22,
              "local_blks_read":23,
              "local_blks_written":25,
              "max_exec_time":15,
              "max_plan_time":8,
              "mean_exec_time":12,
              "mean_plan_time":9,
              "min_exec_time":14,
              "min_plan_time":7,
              "plans":5,
              "query":4,
              "queryid":3,
              "rows":17,
              "shared_blks_dirtied":20,
              "shared_blks_hit":18,
              "shared_blks_read":19,
              "shared_blks_written":21,
              "stddev_exec_time":13,
              "stddev_plan_time":10,
              "temp_blks_read":26,
              "temp_blks_written":27,
              "toplevel":2,
              "total_exec_time":16,
              "total_plan_time":6,
              "usename":33,
              "userid":0,
              "wal_bytes":32,
              "wal_fpi":31,
              "wal_records":30
            },
            "renameByName":{
              "calls":"Calls",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "max_exec_time":"EXEC: max",
              "mean_exec_time":"EXEC: \u00b5",
              "min_exec_time":"EXEC: min",
              "oid":"Relation OID",
              "relam":"Access Method ID",
              "relfilenode":"Rel Filenode",
              "relnamespace":"Schema OID",
              "reloftype":"Comptype OID",
              "relowner":"Owner OID",
              "reltablespace":"Tablespace OID",
              "reltoastrelid":"Toast Table OID",
              "reltype":"Reltype OID",
              "stddev_exec_time":"EXEC: \u03c3",
              "total_exec_time":"EXEC: sum",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#808080","index":0}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#EAB839","value":1},{"color":"#EF843C","value":2},{"color":"#E24D42","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},"unit":"ms"},
        "overrides":[
          { "matcher":{"id":"byName","options":"PLAN: sum"},"properties":[{"id":"color"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7f","value":0},{"color":"#3e668f","value":1e-05}]}}]             },
          { "matcher":{"id":"byName","options":"Plans"}    ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#808080","value":0},{"color":"#3e668f","value":1}]}},{"id":"unit","value":"locale"}] }
        ]
      },
      "gridPos":{"h":15,"w":2,"x":14,"y":5},
      "id":94,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"titleSize":12,"valueSize":10},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query' ORDER BY calls DESC LIMIT 1;","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":true,
              "blk_write_time":true,
              "calls":true,
              "dbid":true,
              "jit_deform_count":true,
              "jit_deform_time":true,
              "jit_emission_count":true,
              "jit_emission_time":true,
              "jit_functions":true,
              "jit_generation_time":true,
              "jit_inlining_count":true,
              "jit_inlining_time":true,
              "jit_optimization_count":true,
              "jit_optimization_time":true,
              "local_blk_read_time":true,
              "local_blk_write_time":true,
              "local_blks_dirtied":true,
              "local_blks_hit":true,
              "local_blks_read":true,
              "local_blks_written":true,
              "max_exec_time":true,
              "max_plan_time":false,
              "mean_exec_time":true,
              "mean_plan_time":false,
              "min_exec_time":true,
              "min_plan_time":false,
              "minmax_stats_since":true,
              "parallel_workers_launched":true,
              "parallel_workers_to_launch":true,
              "plans":false,
              "query":true,
              "queryid":true,
              "rows":true,
              "shared_blk_read_time":true,
              "shared_blk_write_time":true,
              "shared_blks_dirtied":true,
              "shared_blks_hit":true,
              "shared_blks_read":true,
              "shared_blks_written":true,
              "stats_since":true,
              "stddev_exec_time":true,
              "stddev_plan_time":false,
              "temp_blk_read_time":true,
              "temp_blk_write_time":true,
              "temp_blks_read":true,
              "temp_blks_written":true,
              "toplevel":true,
              "total_exec_time":true,
              "total_plan_time":false,
              "usename":true,
              "userid":true,
              "wal_bytes":true,
              "wal_fpi":true,
              "wal_records":true
            },
            "includeByName":{},
            "indexByName":{
              "blk_read_time":28,
              "blk_write_time":29,
              "calls":11,
              "dbid":1,
              "jit_emission_count":41,
              "jit_emission_time":42,
              "jit_functions":35,
              "jit_generation_time":36,
              "jit_inlining_count":37,
              "jit_inlining_time":38,
              "jit_optimization_count":39,
              "jit_optimization_time":40,
              "local_blks_dirtied":24,
              "local_blks_hit":22,
              "local_blks_read":23,
              "local_blks_written":25,
              "max_exec_time":15,
              "max_plan_time":10,
              "mean_exec_time":12,
              "mean_plan_time":6,
              "min_exec_time":14,
              "min_plan_time":9,
              "plans":5,
              "query":4,
              "queryid":3,
              "rows":17,
              "shared_blks_dirtied":20,
              "shared_blks_hit":18,
              "shared_blks_read":19,
              "shared_blks_written":21,
              "stddev_exec_time":13,
              "stddev_plan_time":7,
              "temp_blk_read_time":33,
              "temp_blk_write_time":34,
              "temp_blks_read":26,
              "temp_blks_written":27,
              "toplevel":2,
              "total_exec_time":16,
              "total_plan_time":8,
              "userid":0,
              "wal_bytes":32,
              "wal_fpi":31,
              "wal_records":30
            },
            "renameByName":{
              "calls":"",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "max_exec_time":"EXEC: max",
              "max_plan_time":"PLAN: max",
              "mean_exec_time":"EXEC: \u00b5",
              "mean_plan_time":"PLAN: \u00b5",
              "min_exec_time":"EXEC: min",
              "min_plan_time":"PLAN: min",
              "oid":"Relation OID",
              "plans":"Plans",
              "relam":"Access Method ID",
              "relfilenode":"Rel Filenode",
              "relnamespace":"Schema OID",
              "reloftype":"Comptype OID",
              "relowner":"Owner OID",
              "reltablespace":"Tablespace OID",
              "reltoastrelid":"Toast Table OID",
              "reltype":"Reltype OID",
              "stddev_exec_time":"EXEC: \u03c3",
              "stddev_plan_time":"PLAN: \u03c3",
              "total_exec_time":"EXEC: sum",
              "total_plan_time":"PLAN: sum",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#808080","index":0}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},"unit":"short"},"overrides":[{"matcher":{"id":"byName","options":"PLAN: sum"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]},
      "gridPos":{"h":15,"w":3,"x":16,"y":5},
      "id":88,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"titleSize":12,"valueSize":8},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query' ORDER BY calls DESC LIMIT 1;","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":true,
              "blk_write_time":true,
              "calls":true,
              "dbid":true,
              "jit_deform_count":true,
              "jit_deform_time":true,
              "jit_emission_count":true,
              "jit_emission_time":true,
              "jit_functions":true,
              "jit_generation_time":true,
              "jit_inlining_count":true,
              "jit_inlining_time":true,
              "jit_optimization_count":true,
              "jit_optimization_time":true,
              "local_blks_dirtied":false,
              "local_blks_hit":false,
              "local_blks_read":false,
              "local_blks_written":false,
              "max_exec_time":true,
              "max_plan_time":true,
              "mean_exec_time":true,
              "mean_plan_time":true,
              "min_exec_time":true,
              "min_plan_time":true,
              "minmax_stats_since":true,
              "parallel_workers_launched":true,
              "parallel_workers_to_launch":true,
              "plans":true,
              "query":true,
              "queryid":true,
              "rows":true,
              "shared_blks_dirtied":false,
              "shared_blks_hit":false,
              "shared_blks_read":false,
              "shared_blks_written":false,
              "stats_since":true,
              "stddev_exec_time":true,
              "stddev_plan_time":true,
              "temp_blk_read_time":true,
              "temp_blk_write_time":true,
              "temp_blks_read":false,
              "temp_blks_written":false,
              "toplevel":true,
              "total_exec_time":true,
              "total_plan_time":true,
              "usename":true,
              "userid":true,
              "wal_bytes":true,
              "wal_fpi":true,
              "wal_records":true
            },
            "includeByName":{},
            "indexByName":{
              "blk_read_time":28,
              "blk_write_time":29,
              "calls":11,
              "dbid":1,
              "local_blks_dirtied":24,
              "local_blks_hit":22,
              "local_blks_read":23,
              "local_blks_written":25,
              "max_exec_time":15,
              "max_plan_time":9,
              "mean_exec_time":12,
              "mean_plan_time":6,
              "min_exec_time":14,
              "min_plan_time":8,
              "plans":5,
              "query":4,
              "queryid":3,
              "rows":17,
              "shared_blks_dirtied":20,
              "shared_blks_hit":18,
              "shared_blks_read":19,
              "shared_blks_written":21,
              "stddev_exec_time":13,
              "stddev_plan_time":7,
              "temp_blks_read":26,
              "temp_blks_written":27,
              "toplevel":2,
              "total_exec_time":16,
              "total_plan_time":10,
              "userid":0,
              "wal_bytes":32,
              "wal_fpi":31,
              "wal_records":30
            },
            "renameByName":{
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "max_exec_time":"",
              "max_plan_time":"PLAN: max",
              "mean_exec_time":"",
              "mean_plan_time":"PLAN: \u00b5",
              "min_exec_time":"",
              "min_plan_time":"PLAN: min",
              "oid":"Relation OID",
              "relam":"Access Method ID",
              "relfilenode":"Rel Filenode",
              "relnamespace":"Schema OID",
              "reloftype":"Comptype OID",
              "relowner":"Owner OID",
              "reltablespace":"Tablespace OID",
              "reltoastrelid":"Toast Table OID",
              "reltype":"Reltype OID",
              "stddev_exec_time":"",
              "stddev_plan_time":"PLAN: \u03c3",
              "total_exec_time":"",
              "total_plan_time":"PLAN: sum",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#808080","index":0,"text":"0"}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byRegexp","options":"/.*Time/"} ,"properties":[{"id":"unit","value":"ms"}]     },{ "matcher":{"id":"byRegexp","options":"/.*Count/"},"properties":[{"id":"unit","value":"locale"}] },{ "matcher":{"id":"byName","options":"WAL Bytes"}  ,"properties":[{"id":"unit","value":"bytes"}]  },{ "matcher":{"id":"byName","options":"Rows"}       ,"properties":[{"id":"unit","value":"locale"}] },
          { "matcher":{"id":"byName","options":"WAL Records"},"properties":[{"id":"unit","value":"locale"}] }
        ]
      },
      "gridPos":{"h":15,"w":5,"x":19,"y":5},
      "id":74,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"titleSize":10,"valueSize":10},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        {
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT * FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query' ORDER BY calls DESC LIMIT 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":false,
              "blk_write_time":false,
              "calls":true,
              "dbid":true,
              "jit_deform_count":true,
              "jit_deform_time":true,
              "local_blk_read_time":true,
              "local_blk_write_time":true,
              "local_blks_dirtied":true,
              "local_blks_hit":true,
              "local_blks_read":true,
              "local_blks_written":true,
              "max_exec_time":true,
              "max_plan_time":true,
              "mean_exec_time":true,
              "mean_plan_time":true,
              "min_exec_time":true,
              "min_plan_time":true,
              "minmax_stats_since":true,
              "plans":true,
              "query":true,
              "queryid":true,
              "rows":false,
              "shared_blk_read_time":true,
              "shared_blk_write_time":true,
              "shared_blks_dirtied":true,
              "shared_blks_hit":true,
              "shared_blks_read":true,
              "shared_blks_written":true,
              "stats_since":true,
              "stddev_exec_time":true,
              "stddev_plan_time":true,
              "temp_blks_read":true,
              "temp_blks_written":true,
              "toplevel":true,
              "total_exec_time":true,
              "total_plan_time":true,
              "usename":true,
              "userid":true,
              "wal_buffers_full":false,
              "wal_bytes":false,
              "wal_fpi":false,
              "wal_records":false
            },
            "includeByName":{},
            "indexByName":{
              "calls":11,
              "dbid":1,
              "jit_deform_count":48,
              "jit_deform_time":49,
              "jit_emission_count":40,
              "jit_emission_time":41,
              "jit_functions":34,
              "jit_generation_time":35,
              "jit_inlining_count":36,
              "jit_inlining_time":37,
              "jit_optimization_count":38,
              "jit_optimization_time":39,
              "local_blk_read_time":46,
              "local_blk_write_time":47,
              "local_blks_dirtied":23,
              "local_blks_hit":21,
              "local_blks_read":22,
              "local_blks_written":24,
              "max_exec_time":15,
              "max_plan_time":9,
              "mean_exec_time":12,
              "mean_plan_time":6,
              "min_exec_time":14,
              "min_plan_time":8,
              "minmax_stats_since":51,
              "parallel_workers_launched":43,
              "parallel_workers_to_launch":42,
              "plans":5,
              "query":4,
              "queryid":3,
              "rows":27,
              "shared_blk_read_time":44,
              "shared_blk_write_time":45,
              "shared_blks_dirtied":19,
              "shared_blks_hit":17,
              "shared_blks_read":18,
              "shared_blks_written":20,
              "stats_since":50,
              "stddev_exec_time":13,
              "stddev_plan_time":7,
              "temp_blk_read_time":32,
              "temp_blk_write_time":33,
              "temp_blks_read":25,
              "temp_blks_written":26,
              "toplevel":2,
              "total_exec_time":16,
              "total_plan_time":10,
              "userid":0,
              "wal_buffers_full":31,
              "wal_bytes":28,
              "wal_fpi":29,
              "wal_records":30
            },
            "renameByName":{
              "blk_read_time":"Blk ReadTime",
              "blk_write_time":"Blk WriteTime",
              "jit_emission_count":"JIT EmissionCount",
              "jit_emission_time":"JIT EmissionTime",
              "jit_functions":"JIT Funcs",
              "jit_generation_time":"JIT GenTime",
              "jit_inlining_count":"JIT InlineCount",
              "jit_inlining_time":"JIT InlineTime",
              "jit_optimization_count":"JIT OptimizeCount",
              "jit_optimization_time":"JIT OptimizeTime",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "max_exec_time":"",
              "max_plan_time":"",
              "mean_exec_time":"",
              "mean_plan_time":"",
              "min_exec_time":"",
              "min_plan_time":"",
              "minmax_stats_since":"",
              "oid":"Relation OID",
              "parallel_workers_launched":"Parallel Works Launched",
              "parallel_workers_to_launch":"Parallel Works To Launch",
              "relam":"Access Method ID",
              "relfilenode":"Rel Filenode",
              "relnamespace":"Schema OID",
              "reloftype":"Comptype OID",
              "relowner":"Owner OID",
              "reltablespace":"Tablespace OID",
              "reltoastrelid":"Toast Table OID",
              "reltype":"Reltype OID",
              "rows":"Rows",
              "stddev_exec_time":"",
              "stddev_plan_time":"",
              "temp_blk_read_time":"TmpBlk ReadTime",
              "temp_blk_write_time":"TmpBlk WriteTime",
              "total_exec_time":"",
              "total_plan_time":"",
              "value":"\u53d6\u503c",
              "wal_buffers_full":"WAL Buffers Full",
              "wal_bytes":"WAL Bytes",
              "wal_fpi":"WAL FPI",
              "wal_records":"WAL Records"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "fieldConfig":{"defaults":{"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}},"overrides":[]},
      "gridPos":{"h":13,"w":12,"x":0,"y":7},
      "id":89,
      "options":{
        "afterRender":"",
        "content":"<pre style=\"word-wrap: break-word; font-family: monospace,Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;\"><code class=\"language-sql\">{{ query }}</pre></blockquote>",
        "contentPartials":[],
        "defaultContent":"The query didn't return any results.",
        "editor":{"format":"auto","height":183,"language":"html"},
        "editors":[],
        "externalScripts":[],
        "externalStyles":[],
        "helpers":"",
        "renderMode":"everyRow",
        "styles":"",
        "wrap":true
      },
      "pluginVersion":"6.2.0",
      "targets":[{"datasource":{"type":"postgres","uid":"${dsn}"},"editorMode":"code","format":"table","rawQuery":true,"rawSql":"SELECT * FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND queryid = '$query' LIMIT 1;","refId":"A","sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50}}],
      "title":"Query String",
      "type":"marcusolsson-dynamictext-panel"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"Queries per second according to \n`pg_stat_statements`.`calls`\nin last minute",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"opacity",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"smooth",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"never",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"short"
        },
        "overrides":[{"matcher":{"id":"byName","options":"QPS"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.lineWidth","value":1}]}]
      },
      "gridPos":{"h":6,"w":12,"x":0,"y":20},
      "id":97,
      "options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_query_calls{ins=\"$ins\", datname=\"$datname\", query=\"$query\"}[1m])","hide":false,"interval":"","intervalFactor":1,"legendFormat":"QPS","range":true,"refId":"A"}],
      "title":"QPS (1m)",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"Average Query Latency according to `pg_stat_statements`: rate of `total_exec_time` / rate of `calls` in last minute",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"opacity",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"smooth",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"never",
            "showValues":false,
            "spanNulls":true,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"s"
        },
        "overrides":[{"matcher":{"id":"byName","options":"RT"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}},{"id":"custom.lineWidth","value":2}]}]
      },
      "gridPos":{"h":6,"w":12,"x":12,"y":20},
      "id":96,
      "options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_query_exec_time{ins=\"$ins\", datname=\"$datname\", query=\"$query\"}[1m]) /\n rate(pg_query_calls{ins=\"$ins\", datname=\"$datname\", query=\"$query\"}[1m])","interval":"","intervalFactor":1,"legendFormat":"RT","range":true,"refId":"A"}],
      "title":"RT (1m)",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"It may have multiple records if the same query is executed by multiple different users.",
      "fieldConfig":{
        "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byRegexp","options":"(RT:avg)"},
            "properties":[
              { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
              { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
              { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                                                                                              }
            ]
          },
          {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
          {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":140},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"}]},
          {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
          {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
          {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":40},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
          {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
          {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
          {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]},{"matcher":{"id":"byName","options":"UserID"},"properties":[{"id":"custom.width","value":100}]}
        ]
      },
      "gridPos":{"h":5,"w":24,"x":0,"y":26},
      "id":91,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"RT:avg"}]},
      "pluginVersion":"12.3.0",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "expr":"",
          "format":"table",
          "group":[],
          "legendFormat":"__auto",
          "metricColumn":"none",
          "range":true,
          "rawQuery":true,
          "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname' and queryid = '$query'\nORDER BY mean_exec_time DESC\nLIMIT 100;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Statement Detail",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "blk_read_time":false,
              "blk_write_time":false,
              "datname":true,
              "dbid":true,
              "local_blks_dirtied":false,
              "local_blks_hit":false,
              "local_blks_read":false,
              "local_blks_written":false,
              "max_plan_time":false,
              "mean_plan_time":false,
              "min_plan_time":false,
              "plans":false,
              "qid":true,
              "query":true,
              "queryid":true,
              "shared_blks_dirtied":false,
              "shared_blks_hit":false,
              "shared_blks_read":false,
              "shared_blks_written":false,
              "stddev_exec_time":false,
              "stddev_plan_time":false,
              "temp_blk_read_time":false,
              "temp_blk_write_time":false,
              "temp_blks_read":false,
              "temp_blks_written":false,
              "total_plan_time":false,
              "userid":false
            },
            "includeByName":{},
            "indexByName":{
              "blk_read_time":34,
              "blk_write_time":35,
              "calls":8,
              "datname":3,
              "dbid":6,
              "jit_emission_count":44,
              "jit_emission_time":45,
              "jit_functions":38,
              "jit_generation_time":39,
              "jit_inlining_count":40,
              "jit_inlining_time":41,
              "jit_optimization_count":42,
              "jit_optimization_time":43,
              "local_blks_dirtied":30,
              "local_blks_hit":28,
              "local_blks_read":29,
              "local_blks_written":31,
              "max_exec_time":13,
              "max_plan_time":20,
              "mean_exec_time":12,
              "mean_plan_time":18,
              "min_exec_time":14,
              "min_plan_time":19,
              "plans":16,
              "qid":4,
              "query":5,
              "queryid":7,
              "rolname":1,
              "rows":9,
              "shared_blks_dirtied":26,
              "shared_blks_hit":24,
              "shared_blks_read":25,
              "shared_blks_written":27,
              "stddev_exec_time":15,
              "stddev_plan_time":21,
              "temp_blk_read_time":36,
              "temp_blk_write_time":37,
              "temp_blks_read":32,
              "temp_blks_written":33,
              "toplevel":0,
              "total_exec_time":11,
              "total_plan_time":17,
              "userid":2,
              "wal_bytes":10,
              "wal_fpi":23,
              "wal_records":22
            },
            "renameByName":{
              "blk_read_time":"Blk RTime",
              "blk_write_time":"TBlk WTime",
              "calls":"Calls",
              "datname":"Database",
              "dbid":"DBID",
              "jit_deform_count":"JitDeform Count",
              "jit_deform_time":"JitDeform Time",
              "jit_emission_count":"JIT Emission Count",
              "jit_emission_time":"JIT Emission Time",
              "jit_functions":"JIT Functions",
              "jit_generation_time":"JIT Generate Time",
              "jit_inlining_count":"JIT Inline Count",
              "jit_inlining_time":"JIT Inline Time",
              "jit_optimization_count":"JIT Optimize Count",
              "jit_optimization_time":"JIT Optimize Time",
              "local_blk_read_time":"LBlk RTime",
              "local_blk_write_time":"LBlk WTime",
              "local_blks_dirtied":"LBlks Dirty",
              "local_blks_hit":"LBlks Hit",
              "local_blks_read":"LBlks Read",
              "local_blks_written":"LBlks Write",
              "max_exec_time":"RT:max",
              "max_plan_time":"Plan:max",
              "mean_exec_time":"RT:avg",
              "mean_plan_time":"Plan:avg",
              "min_exec_time":"RT:min",
              "min_plan_time":"Plan:min",
              "minmax_stats_since":"MinMax Since",
              "parallel_workers_launched":"PW Launched",
              "parallel_workers_to_launch":"PW2Launch",
              "plans":"Plan",
              "qid":"Query",
              "query":"SQL",
              "queryid":"QID",
              "rolname":"User",
              "rows":"Rows",
              "shared_blk_read_time":"SBlk RTime",
              "shared_blk_write_time":"SBlk WTime",
              "shared_blks_dirtied":"SBlks Dirty",
              "shared_blks_hit":"SBlks Hit",
              "shared_blks_read":"SBlks Read",
              "shared_blks_written":"SBlks Write",
              "stats_since":"Since",
              "stddev_exec_time":"RT:\u03c3",
              "stddev_plan_time":"Plan:\u03c3",
              "temp_blk_read_time":"TBlk RTime",
              "temp_blk_write_time":"TBlk WTime",
              "temp_blks_read":"TBlks Read",
              "temp_blks_written":"TBlks Write",
              "toplevel":"Top",
              "total_exec_time":"Time",
              "total_plan_time":"Plan:sum",
              "userid":"UserID",
              "wal_buffers_full":"WalBufFull",
              "wal_bytes":"WAL",
              "wal_fpi":"WAL FPIs",
              "wal_records":"WAL Recs"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":31},
      "id":55,
      "panels":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "description":"pg_stat_statements of database ${datname}, order by mean_exec_time DESC.",
          "fieldConfig":{
            "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
            "overrides":[
              {
                "matcher":{"id":"byRegexp","options":"(RT:avg)"},
                "properties":[
                  { "id":"unit"              ,"value":"ms"                                                                                                                                                                                                                                                                                                                                           },
                  { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                                                                                                             },
                  { "id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}                                                                                                                                                                                                                                                                                                     },
                  { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":0.1},{"color":"light-green","value":1},{"color":"#346f36cc","value":2},{"color":"#fcdb72","value":10},{"color":"#f79f64","value":100},{"color":"red","value":1000},{"color":"#b783af","value":60000},{"color":"rgb(80, 6, 94)","value":600000}]} }
                ]
              },
              {"matcher":{"id":"byName","options":"Query"},"properties":[{"id":"custom.width","value":200},{"id":"unit","value":"string"},{"id":"links","value":[{"title":"${__data.fields.SQL}","url":"/d/pgcat-query?var-dsn=${dsn:text}&var-query=${__data.fields.Query}"}]},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGCAT Database for ${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}]}]},
              {"matcher":{"id":"byName","options":"User"},"properties":[{"id":"custom.width","value":120},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byName","options":"SQL"},"properties":[{"id":"unit","value":"string"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":256},{"id":"custom.inspect","value":true},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Calls"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Rows"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
              {"matcher":{"id":"byName","options":"Time"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"ms"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
              {"matcher":{"id":"byName","options":"Top"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#f79f64","index":0,"text":"F"},"true":{"color":"#346f36cc","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byRegexp","options":"/Plan:.*|RT:.*|.*Time/"},"properties":[{"id":"unit","value":"ms"},{"id":"custom.width","value":100}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blks.*/"},"properties":[{"id":"unit","value":"locale"},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7a7a7a40","value":1}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"Plan"},"properties":[{"id":"custom.width","value":40},{"id":"unit","value":"short"}]},
              {"matcher":{"id":"byRegexp","options":"/WAL.*/"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Count/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/JIT.*Time/"},"properties":[{"id":"custom.width","value":150},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-09}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byName","options":"JIT Functions"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
              {"matcher":{"id":"byRegexp","options":"/.*Blk.*Time/"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#7d7d7d33","value":1e-07}]}}]}
            ]
          },
          "gridPos":{"h":18,"w":24,"x":0,"y":32},
          "id":90,
          "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Calls"}]},
          "pluginVersion":"12.3.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "expr":"",
              "format":"table",
              "group":[],
              "legendFormat":"__auto",
              "metricColumn":"none",
              "range":true,
              "rawQuery":true,
              "rawSql":"SELECT queryid::TEXT AS qid, d.datname, r.rolname, s.*\nFROM pg_stat_statements s\n         LEFT JOIN pg_database d ON s.dbid = d.oid\n         LEFT JOIN pg_roles r ON s.userid = r.oid\nWHERE datname='$datname'\nORDER BY mean_exec_time DESC\nLIMIT 100;",
              "refId":"A",
              "select":[[{"params":["value"],"type":"column"}]],
              "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
              "timeColumn":"time",
              "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
            }
          ],
          "title":"Top SQL by RT",
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{
                  "blk_read_time":false,
                  "blk_write_time":false,
                  "datname":true,
                  "dbid":true,
                  "local_blks_dirtied":false,
                  "local_blks_hit":false,
                  "local_blks_read":false,
                  "local_blks_written":false,
                  "max_plan_time":false,
                  "mean_plan_time":false,
                  "min_plan_time":false,
                  "plans":false,
                  "queryid":true,
                  "shared_blks_dirtied":false,
                  "shared_blks_hit":false,
                  "shared_blks_read":false,
                  "shared_blks_written":false,
                  "stddev_exec_time":false,
                  "stddev_plan_time":false,
                  "temp_blk_read_time":false,
                  "temp_blk_write_time":false,
                  "temp_blks_read":false,
                  "temp_blks_written":false,
                  "total_plan_time":false,
                  "userid":true
                },
                "indexByName":{
                  "blk_read_time":34,
                  "blk_write_time":35,
                  "calls":8,
                  "datname":1,
                  "dbid":6,
                  "jit_emission_count":44,
                  "jit_emission_time":45,
                  "jit_functions":38,
                  "jit_generation_time":39,
                  "jit_inlining_count":40,
                  "jit_inlining_time":41,
                  "jit_optimization_count":42,
                  "jit_optimization_time":43,
                  "local_blks_dirtied":30,
                  "local_blks_hit":28,
                  "local_blks_read":29,
                  "local_blks_written":31,
                  "max_exec_time":13,
                  "max_plan_time":20,
                  "mean_exec_time":12,
                  "mean_plan_time":18,
                  "min_exec_time":14,
                  "min_plan_time":19,
                  "plans":16,
                  "qid":2,
                  "query":3,
                  "queryid":7,
                  "rolname":4,
                  "rows":9,
                  "shared_blks_dirtied":26,
                  "shared_blks_hit":24,
                  "shared_blks_read":25,
                  "shared_blks_written":27,
                  "stddev_exec_time":15,
                  "stddev_plan_time":21,
                  "temp_blk_read_time":36,
                  "temp_blk_write_time":37,
                  "temp_blks_read":32,
                  "temp_blks_written":33,
                  "toplevel":0,
                  "total_exec_time":11,
                  "total_plan_time":17,
                  "userid":5,
                  "wal_bytes":10,
                  "wal_fpi":23,
                  "wal_records":22
                },
                "renameByName":{
                  "blk_read_time":"Blk RTime",
                  "blk_write_time":"TBlk WTime",
                  "calls":"Calls",
                  "datname":"Database",
                  "dbid":"DBID",
                  "jit_emission_count":"JIT Emission Count",
                  "jit_emission_time":"JIT Emission Time",
                  "jit_functions":"JIT Functions",
                  "jit_generation_time":"JIT Generate Time",
                  "jit_inlining_count":"JIT Inline Count",
                  "jit_inlining_time":"JIT Inline Time",
                  "jit_optimization_count":"JIT Optimize Count",
                  "jit_optimization_time":"JIT Optimize Time",
                  "local_blks_dirtied":"LBlks Dirty",
                  "local_blks_hit":"LBlks Hit",
                  "local_blks_read":"LBlks Read",
                  "local_blks_written":"LBlks Write",
                  "max_exec_time":"RT:max",
                  "max_plan_time":"Plan:max",
                  "mean_exec_time":"RT:avg",
                  "mean_plan_time":"Plan:avg",
                  "min_exec_time":"RT:min",
                  "min_plan_time":"Plan:min",
                  "plans":"Plan",
                  "qid":"Query",
                  "query":"SQL",
                  "queryid":"QID",
                  "rolname":"User",
                  "rows":"Rows",
                  "shared_blks_dirtied":"SBlks Dirty",
                  "shared_blks_hit":"SBlks Hit",
                  "shared_blks_read":"SBlks Read",
                  "shared_blks_written":"SBlks Write",
                  "stddev_exec_time":"RT:\u03c3",
                  "stddev_plan_time":"Plan:\u03c3",
                  "temp_blk_read_time":"TBlk RTime",
                  "temp_blk_write_time":"TBlk WTime",
                  "temp_blks_read":"TBlks Read",
                  "temp_blks_written":"TBlks Write",
                  "toplevel":"Top",
                  "total_exec_time":"Time",
                  "total_plan_time":"Plan:sum",
                  "userid":"UserID",
                  "wal_bytes":"WAL",
                  "wal_fpi":"WAL FPIs",
                  "wal_records":"WAL Recs"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Overview",
      "type":"row"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","PGSQL","PGCAT","Database","Query"],
  "templating":{
    "list":[
      {"current":{},"description":"Database Instance","includeAll":false,"label":"Data Source","name":"dsn","options":[],"query":"postgres","refresh":1,"regex":"/.*\\..*/","type":"datasource"},
      {"current":{},"datasource":{"type":"postgres","uid":"ds-meta"},"definition":"SELECT '${dsn:text}';","description":"Instance","hide":2,"includeAll":false,"label":"Instance","name":"ins","options":[],"query":"SELECT '${dsn:text}';","refresh":2,"regex":"/(\\S+)\\.\\S+/","sort":1,"type":"query"},
      {"current":{},"datasource":{"uid":"$dsn"},"definition":"SELECT '${dsn:text}';","description":"Database name of this table","hide":2,"includeAll":false,"label":"Database","name":"datname","options":[],"query":"SELECT '${dsn:text}';","refresh":1,"regex":"/\\S+\\.(\\S+)/","type":"query"},
      {
        "current":{},
        "datasource":{"uid":"$dsn"},
        "definition":"SELECT distinct queryid::TEXT FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND userid != 10 LIMIT 1000;",
        "description":"Query Identifier",
        "includeAll":false,
        "label":"Query",
        "name":"query",
        "options":[],
        "query":"SELECT distinct queryid::TEXT FROM pg_stat_statements WHERE dbid = (SELECT oid FROM pg_database WHERE datname = '${datname}') AND userid != 10 LIMIT 1000;",
        "refresh":1,
        "regex":"",
        "sort":1,
        "type":"query"
      },
      {"current":{},"datasource":{"type":"postgres","uid":"ds-meta"},"definition":"SELECT '${dsn:text}';","description":"Cluster identifier","hide":2,"includeAll":false,"label":"Cluster","name":"cls","options":[],"query":"SELECT '${dsn:text}';","refresh":2,"regex":"/(\\S+)-\\d+\\.\\S+/","sort":1,"type":"query"}
    ]
  },
  "time":{"from":"now-1h","to":"now"},
  "timepicker":{"refresh_intervals":["2s","3s","5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"]},
  "timezone":"browser",
  "title":"PGCAT Query",
  "uid":"pgcat-query",
  "version":1,
  "weekStart":""
}