{
  "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 Tables",
  "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":[
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":24,"panels":[],"title":"$relname (${oid})","type":"row"},
    {
      "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"}]}},
        "overrides":[
          { "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGCAT Instance : ${ins}","url":"/d/pgcat-instance?var-dsn=${dsn:text}&${__url_time_range}"}]}]                                               },
          { "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGCAT Schema : ${ins}.${datname}.${nspname}","url":"/d/pgcat-schema?var-dsn=${ins}.${datname}&var-schema=${nspname}&${__url_time_range}"}]}] },
          { "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"PGCAT Database : ${ins}.${datname}","url":"/d/pgcat-database?var-dsn=${ins}.${datname}&${__url_time_range}"}]}]                              },
          { "matcher":{"id":"byFrameRefID","options":"D"},"properties":[{"id":"links","value":[{"title":"PGSQL Table : ${relname}","url":"/d/pgsql-table?var-ins=${ins}&var-datname=${datname}&var-relname=${relname}&${__url_time_range}"}]}]        }
        ]
      },
      "gridPos":{"h":7,"w":6,"x":0,"y":1},
      "id":64,
      "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.0.0",
      "targets":[
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Relation","type":"string","values":["${relname}"]}],"meta":{},"name":""},"hide":false,"refId":"D" },
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Schema","type":"string","values":["${nspname}"]}],"meta":{},"name":""}  ,"hide":false,"refId":"B" },
        { "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" }
      ],
      "title":"",
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
        "overrides":[
          {"matcher":{"id":"byName","options":"No"},"properties":[{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Column"},"properties":[{"id":"custom.width"}]},
          {
            "matcher":{"id":"byName","options":"Storage"},
            "properties":[{"id":"custom.width","value":85},{"id":"mappings","value":[{"options":{"e":{"color":"#cc4637d9","index":2,"text":"External"},"m":{"color":"#346f36cc","index":1,"text":"Main"},"p":{"color":"#3e668f","index":0,"text":"Plain"},"x":{"color":"#f79f64","index":3,"text":"Extended"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}]
          },{
            "matcher":{"id":"byName","options":"Align"},
            "properties":[{"id":"mappings","value":[{"options":{"c":{"color":"#5b9cd5","index":0,"text":"C/1"},"d":{"color":"#346f36cc","index":3,"text":"D/8"},"i":{"color":"#3e668f","index":2,"text":"I/4"},"s":{"color":"#3e668f","index":1,"text":"S/2"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.width","value":75},{"id":"custom.filterable","value":true}]
          },{
            "matcher":{"id":"byName","options":"Len"},
            "properties":[
              {
                "id":"mappings",
                "value":[{"options":{"1":{"color":"#5b9cd5","index":1,"text":"1"},"2":{"color":"#3e668f","index":2,"text":"2"}},"type":"value"},{"options":{"from":-2,"result":{"color":"#cc4637d9","index":0,"text":"Var"},"to":0},"type":"range"},{"options":{"from":3,"result":{"color":"#3e668f","index":3},"to":7.9},"type":"range"},{"options":{"from":8,"result":{"color":"#346f36cc","index":4},"to":999},"type":"range"}]
              },
              {"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.width","value":75},{"id":"custom.filterable","value":true}
            ]
          },
          {"matcher":{"id":"byName","options":"Dim"},"properties":[{"id":"custom.width","value":60},{"id":"mappings","value":[{"options":{"0":{"color":"transparent","index":0,"text":"N"},"1":{"color":"#3e668f","index":1,"text":"1"},"2":{"color":"#f79f64","index":2,"text":"2"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"Dropped"},"properties":[{"id":"custom.width","value":75},{"id":"mappings","value":[{"options":{"false":{"color":"transparent","index":0,"text":"F"},"true":{"color":"#cc4637d9","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}}]},
          {"matcher":{"id":"byName","options":"Collation"},"properties":[{"id":"custom.width","value":80}]},
          {"matcher":{"id":"byName","options":"NOT NULL"},"properties":[{"id":"custom.width","value":110},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"mappings","value":[{"options":{"false":{"color":"transparent","index":0,"text":"NULLABLE"},"true":{"color":"#f79f64","index":1,"text":"NOT NULL"}},"type":"value"}]},{"id":"custom.filterable","value":true}]},
          {"matcher":{"id":"byName","options":"TypeID"},"properties":[{"id":"custom.width","value":65}]},{"matcher":{"id":"byName","options":"Type"},"properties":[{"id":"custom.minWidth","value":140},{"id":"custom.filterable","value":true}]}
        ]
      },
      "gridPos":{"h":10,"w":18,"x":6,"y":1},
      "id":38,
      "options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":false,"displayName":"No"}]},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "hide":false,
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT *, pg_catalog.format_type(a.atttypid, a.atttypmod) AS atttype\nFROM pg_attribute a LEFT JOIN LATERAL (\n    SELECT pg_catalog.pg_get_expr(d.adbin, d.adrelid, true) AS def\n    FROM pg_catalog.pg_attrdef d\n    WHERE d.adrelid = a.attrelid\n      AND d.adnum = a.attnum\n      AND a.atthasdef\n    ) d ON true\nWHERE attrelid = '${oid}' AND attnum > 0 ORDER BY attnum;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"attacl":true,"attbyval":true,"attcacheoff":true,"attcollation":true,"attcompression":true,"attfdwoptions":true,"attgenerated":true,"atthasdef":true,"atthasmissing":true,"attidentity":true,"attinhcount":true,"attislocal":true,"attmissingval":true,"attoptions":true,"attrelid":true,"attstattarget":true,"atttypmod":true},
            "indexByName":{
              "attacl":14,
              "attalign":7,
              "attbyval":19,
              "attcacheoff":17,
              "attcollation":11,
              "attfdwoptions":25,
              "attgenerated":21,
              "atthasdef":13,
              "atthasmissing":20,
              "attidentity":12,
              "attinhcount":23,
              "attisdropped":4,
              "attislocal":22,
              "attlen":8,
              "attmissingval":26,
              "attname":1,
              "attndims":9,
              "attnotnull":3,
              "attnum":0,
              "attoptions":24,
              "attrelid":15,
              "attstattarget":16,
              "attstorage":6,
              "atttype":2,
              "atttypid":5,
              "atttypmod":18,
              "def":10
            },
            "renameByName":{"attacl":"","attalign":"Align","attcollation":"Collation","atthasdef":"","attidentity":"ID","attisdropped":"Dropped","attlen":"Len","attname":"Column","attndims":"Dim","attnotnull":"NOT NULL","attnum":"No","attstorage":"Storage","atttype":"Type","atttypid":"TypeID","avg_width":"Avg Width","correlation":"Correlation","def":"Default","n_distinct":"N Distinct","null_frac":"Null Frac"}
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"text"}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Kind"},
            "properties":[
              {
                "id":"mappings",
                "value":[
                  {
                    "options":{
                      "I":{ "color":"super-light-green" ,"index": 9,"text":"Partitioned Index" },
                      "P":{ "color":"#3274D9"           ,"index":10,"text":"Partition Table"   },
                      "S":{ "color":"#fcdb72"           ,"index": 2,"text":"Sequence"          },
                      "c":{ "color":"super-light-orange","index": 6,"text":"Componse Type"     },
                      "f":{ "color":"#f79f64"           ,"index": 7,"text":"Foreign table"     },
                      "i":{ "color":"#346f36cc"         ,"index": 1,"text":"Regular Index"     },
                      "m":{ "color":"dark-blue"         ,"index": 5,"text":"Materialized View" },
                      "p":{ "color":"#284766"           ,"index": 8,"text":"Partitioned Table" },
                      "r":{ "color":"#3e668f"           ,"index": 0,"text":"Regular Table"     },
                      "t":{ "color":"#808080"           ,"index": 3,"text":"Toast Table"       },
                      "v":{ "color":"red"               ,"index": 4,"text":"Regular View"      }
                    },
                    "type":"value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos":{"h":3,"w":6,"x":0,"y":8},
      "id":62,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"textMode":"value","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "exemplar":false,
          "expr":"SELECT * FROM pg_class;",
          "format":"table",
          "group":[],
          "instant":true,
          "interval":"",
          "legendFormat":"",
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT relkind FROM pg_class WHERE relname = '$tblname';",
          "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":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "Time 1":true,
              "Time 10":true,
              "Time 2":true,
              "Time 3":true,
              "Time 4":true,
              "Time 5":true,
              "Time 6":true,
              "Time 7":true,
              "Time 8":true,
              "Time 9":true,
              "acl":true,
              "analyze_count":false,
              "autoanalyze_count":false,
              "autovacuum_count":false,
              "datcollate":true,
              "datctype":true,
              "datfrozenxid":true,
              "description":true,
              "encoding":true,
              "idx_tup_fetch":false,
              "n_ins_since_vacuum":false,
              "n_mod_since_analyze":false,
              "n_tup_hot_upd":false,
              "nspname":true,
              "relallvisible":false,
              "relam":true,
              "relfilenode":false,
              "relid":true,
              "relname":true,
              "relnamespace":true,
              "reloftype":true,
              "relowner":true,
              "relpages":false,
              "relrewrite":true,
              "reltablespace":true,
              "reltype":true,
              "schemaname":true,
              "seq_tup_read":false,
              "tablespace":true,
              "vacuum_count":false
            },
            "indexByName":{
              "Name":2,
              "Owner":4,
              "age":14,
              "oid":0,
              "relacl":34,
              "relallvisible":10,
              "relam":21,
              "relchecks":23,
              "relfilenode":5,
              "relforcerowsecurity":30,
              "relfrozenxid":15,
              "relhasindex":25,
              "relhasrules":26,
              "relhassubclass":28,
              "relhastriggers":27,
              "relispartition":32,
              "relispopulated":31,
              "relisshared":24,
              "relkind":1,
              "relminmxid":16,
              "relname":3,
              "relnamespace":17,
              "relnatts":6,
              "reloftype":19,
              "reloptions":35,
              "relowner":20,
              "relpages":9,
              "relpartbound":36,
              "relpersistence":11,
              "relreplident":12,
              "relrewrite":33,
              "relrowsecurity":29,
              "reltablespace":22,
              "reltoastrelid":13,
              "reltuples":7,
              "reltype":18,
              "size":8
            },
            "renameByName":{
              "I":"Partitioned Index",
              "Kind":"Kind",
              "Name":"Name",
              "Owner":"Owner",
              "S":"Sequence",
              "Size":"Size",
              "Time 1":"",
              "Time 7":"",
              "Value #A":"Size",
              "Value #B":"Age",
              "Value #C":"Status",
              "Value #D":"Session",
              "Value #E":"TPS",
              "Value #F":"ConnLimit",
              "Value #G":"Reserve",
              "Value #H":"Current",
              "Value #I":"Disable",
              "Value #J":"Pause",
              "acl":"Privileges",
              "age":"Age",
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "c":"Compose Type",
              "datallowconn":"Conn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datistemplate":"Tmpl",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "f":"Foreign Table",
              "host":"Target",
              "i":"Index",
              "idx_scan":"Idx Scan",
              "idx_tup_fetch":"Index Rows",
              "kind":"Kind",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "m":"Materialized View",
              "n_dead_tup":"Dead",
              "n_ins_since_vacuum":"nInsSinceVacuum",
              "n_live_tup":"Live",
              "n_mod_since_analyze":"nModSinceAnalyze",
              "n_tup_del":"Deleted",
              "n_tup_hot_upd":"HOT Update",
              "n_tup_ins":"Inserted",
              "n_tup_mod":"Modified",
              "n_tup_upd":"Updated",
              "name":"Name",
              "nspname":"Schema",
              "oid":"OID",
              "owner":"Owner",
              "p":"Partitioned Table",
              "pg_table_size":"Size",
              "r":"Table",
              "real_datname":"Datname",
              "rel":"Table",
              "relacl":"ACL",
              "relage":"Age",
              "relallvisible":"nVisible",
              "relchecks":"nChecks",
              "relfilenode":"Filenode",
              "relforcerowsecurity":"EnfoceRLS",
              "relfrozenxid":"FrozenXID",
              "relhasindex":"HasIndex",
              "relhasrules":"HasRule",
              "relhassubclass":"HasSubClass",
              "relhastriggers":"HasTrigger",
              "relid":"",
              "relispartition":"IsPartition",
              "relispopulated":"IsPopulated",
              "relisshared":"IsShared",
              "relkind":"Kind",
              "relminmxid":"MinXmin",
              "relname":"",
              "relnatts":"nAttr",
              "reloptions":"Options",
              "relpages":"Pages",
              "relpartbound":"PartBound",
              "relpersistence":"Persist",
              "relreplident":"Identity",
              "relrewrite":"",
              "relrowsecurity":"EnableRLS",
              "reltablespace":"",
              "reltoastrelid":"ToastID",
              "reltuples":"Tuples",
              "seq_scan":"Seq Scan",
              "seq_tup_read":"Scan Rows",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "t":"Toast",
              "tablespace":"Tablespace",
              "tbl_scan":"Scan",
              "tup_read":"Scanned",
              "v":"View",
              "vacuum_count":"Vacuum Count"
            }
          }
        }
      ],
      "type":"stat"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":11},"id":56,"panels":[],"title":"Class Meta","type":"row"},
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"text":""}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":10,"w":6,"x":0,"y":12},
      "id":53,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT oid, relnamespace, reltype, reloftype, relowner, relam, relfilenode, reltablespace, reltoastrelid FROM pg_class c WHERE oid = '$oid';","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "title":"",
      "transformations":[
        { "id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"key":"\u6807\u8bc6\u7b26\u540d\u79f0","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","value":"\u53d6\u503c"}} },
        { "id":"reduce"  ,"options":{"reducers":["lastNotNull"]}                                                                                                                                                                                                                                                                                                                                               },
        { "id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"Field":"Identifier","Last (not null)":"Value"}}                                                                                                                                                                                                                                                                      }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"text":"FALSE"},"1":{"text":"TRUE"}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1}]}},
        "overrides":[{"matcher":{"id":"byType","options":"boolean"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#e3e3e3e0","index":0,"text":"False"},"true":{"color":"#abababeb","index":1,"text":"True"}},"type":"value"}]}]}]
      },
      "gridPos":{"h":10,"w":6,"x":6,"y":12},
      "id":10,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT relhasindex,\n       relispartition,\n       relisshared,\n       relhasrules,\n       relhastriggers,\n       relhassubclass,\n       relrowsecurity,\n       relforcerowsecurity,\n       relispopulated\nFROM pg_class c\nWHERE oid = '${oid}'",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{},
            "indexByName":{},
            "renameByName":{
              "key":"\u5c5e\u6027\u540d\u79f0",
              "relforcerowsecurity":"Force RLS",
              "relhasindex":"Has Index",
              "relhasrules":"Has Rule",
              "relhassubclass":"Has Subclass",
              "relhastriggers":"Has Trigger",
              "relispartition":"Is Partitioned",
              "relispopulated":"Is Populated",
              "relisshared":"Is Shared",
              "relrowsecurity":"Row level security",
              "reltemporary":"\u4e34\u65f6\u8868",
              "relunlogged":"\u4e0d\u8bb0\u5165WAL",
              "value":"\u5c5e\u6027\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":10,"w":6,"x":12,"y":12},
      "id":30,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT relpages ::BIGINT, (relpages * 8192::REAL) AS relsize, reltuples ::REAL, relallvisible ::BIGINT, relnatts ::BIGINT, relchecks ::BIGINT, relfrozenxid, age(relfrozenxid) ::BIGINT AS age, relminmxid FROM pg_class c WHERE oid = '${oid}';",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{},
            "indexByName":{},
            "renameByName":{
              "age":"Age",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "oid":"\u5173\u7cfbID",
              "relallvisible":"Rel All Visible",
              "relam":"\u8bbf\u95ee\u65b9\u6cd5ID",
              "relchecks":"Checks",
              "relfilenode":"\u8868\u6587\u4ef6\u8282\u70b9",
              "relforcerowsecurity":"\u5f3a\u5236\u884c\u7ea7\u5b89\u5168",
              "relfrozenxid":"Fronzen XID",
              "relhasindex":"\u62e5\u6709\u7d22\u5f15",
              "relhasrules":"\u5e26\u6709\u89c4\u5219",
              "relhassubclass":"\u62e5\u6709\u5b50\u7c7b",
              "relhastriggers":"\u5e26\u89e6\u53d1\u5668",
              "relispopulated":"\u5df2\u88ab\u586b\u5145",
              "relisshared":"\u8de8\u5e93\u5171\u4eab",
              "relminmxid":"Min XID",
              "relnamespace":"\u6a21\u5f0fID",
              "relnatts":"Columns",
              "reloftype":"\u590d\u5408\u7c7b\u578bID",
              "relowner":"\u8868\u5c5e\u4e3bID",
              "relpages":"Rel Pages",
              "relrowsecurity":"\u884c\u7ea7\u5b89\u5168",
              "relsize":"Rel Bytes",
              "reltablespace":"\u8868\u7a7a\u95f4ID",
              "reltoastrelid":"TOAST\u8868ID",
              "reltuples":"Rel Tuples",
              "reltype":"\u884c\u7c7b\u578bID",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"text":"FALSE"},"1":{"text":"TRUE"}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"},{"color":"#e3e3e3e0","value":0},{"color":"#f79f64","value":1}]}},"overrides":[]},
      "gridPos":{"h":3,"w":6,"x":18,"y":12},
      "id":37,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT \n   CASE relpersistence WHEN 'u' THEN 1 ELSE 0 END AS relunlogged,\n   CASE relpersistence WHEN 't' THEN 1 ELSE 0 END AS reltemporary\nFROM pg_class c WHERE oid = '${oid}'",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{},
            "indexByName":{},
            "renameByName":{
              "acl":"ACL",
              "age":"\u8868\u5e74\u9f84",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "oid":"\u5173\u7cfbID",
              "opt":"\u8868\u53c2\u6570/\u9009\u9879",
              "relallvisible":"\u53ef\u89c1\u9875\u6570",
              "relam":"\u8bbf\u95ee\u65b9\u6cd5ID",
              "relchecks":"CHECK\u7ea6\u675f\u6570\u91cf",
              "relfilenode":"\u8868\u6587\u4ef6\u8282\u70b9",
              "relforcerowsecurity":"\u5f3a\u5236\u884c\u7ea7\u5b89\u5168",
              "relfrozenxid":"\u51bb\u7ed3\u4e8b\u52a1ID",
              "relhasindex":"\u62e5\u6709\u7d22\u5f15",
              "relhasrules":"\u5e26\u6709\u89c4\u5219",
              "relhassubclass":"\u62e5\u6709\u5b50\u7c7b",
              "relhastriggers":"\u5e26\u89e6\u53d1\u5668",
              "relispopulated":"\u5df2\u88ab\u586b\u5145",
              "relisshared":"\u8de8\u5e93\u5171\u4eab",
              "relminmxid":"\u4e8c\u9636\u6bb5\u4e8b\u52a1ID",
              "relnamespace":"\u6a21\u5f0fID",
              "relnatts":"\u5217\u6570",
              "reloftype":"\u590d\u5408\u7c7b\u578bID",
              "relowner":"\u8868\u5c5e\u4e3bID",
              "relpages":"\u9875\u9762\u6570\u91cf",
              "relrowsecurity":"\u884c\u7ea7\u5b89\u5168",
              "reltablespace":"\u8868\u7a7a\u95f4ID",
              "reltemporary":"Temporary",
              "reltoastrelid":"TOAST\u8868ID",
              "reltuples":"\u5143\u7ec4\u6570\u91cf",
              "reltype":"\u884c\u7c7b\u578bID",
              "relunlogged":"Unlogged",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":5,"w":6,"x":18,"y":15},
      "id":36,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":14},"textMode":"value","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT unnest(relacl) AS acl FROM pg_class c WHERE oid = '${oid}';","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{},
            "indexByName":{},
            "renameByName":{
              "acl":"ACL",
              "age":"\u8868\u5e74\u9f84",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "oid":"\u5173\u7cfbID",
              "relallvisible":"\u53ef\u89c1\u9875\u6570",
              "relam":"\u8bbf\u95ee\u65b9\u6cd5ID",
              "relchecks":"CHECK\u7ea6\u675f\u6570\u91cf",
              "relfilenode":"\u8868\u6587\u4ef6\u8282\u70b9",
              "relforcerowsecurity":"\u5f3a\u5236\u884c\u7ea7\u5b89\u5168",
              "relfrozenxid":"\u51bb\u7ed3\u4e8b\u52a1ID",
              "relhasindex":"\u62e5\u6709\u7d22\u5f15",
              "relhasrules":"\u5e26\u6709\u89c4\u5219",
              "relhassubclass":"\u62e5\u6709\u5b50\u7c7b",
              "relhastriggers":"\u5e26\u89e6\u53d1\u5668",
              "relispopulated":"\u5df2\u88ab\u586b\u5145",
              "relisshared":"\u8de8\u5e93\u5171\u4eab",
              "relminmxid":"\u4e8c\u9636\u6bb5\u4e8b\u52a1ID",
              "relnamespace":"\u6a21\u5f0fID",
              "relnatts":"\u5217\u6570",
              "reloftype":"\u590d\u5408\u7c7b\u578bID",
              "relowner":"\u8868\u5c5e\u4e3bID",
              "relpages":"\u9875\u9762\u6570\u91cf",
              "relrowsecurity":"\u884c\u7ea7\u5b89\u5168",
              "reltablespace":"\u8868\u7a7a\u95f4ID",
              "reltoastrelid":"TOAST\u8868ID",
              "reltuples":"\u5143\u7ec4\u6570\u91cf",
              "reltype":"\u884c\u7c7b\u578bID",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"noValue":"nil options","thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":2,"w":6,"x":18,"y":20},
      "id":35,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"value","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT unnest(reloptions) AS opt FROM pg_class c WHERE oid = '${oid}';","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{},
            "indexByName":{},
            "renameByName":{
              "acl":"ACL",
              "age":"\u8868\u5e74\u9f84",
              "key":"\u6807\u8bc6\u7b26\u540d\u79f0",
              "oid":"\u5173\u7cfbID",
              "opt":"Options",
              "relallvisible":"\u53ef\u89c1\u9875\u6570",
              "relam":"\u8bbf\u95ee\u65b9\u6cd5ID",
              "relchecks":"CHECK\u7ea6\u675f\u6570\u91cf",
              "relfilenode":"\u8868\u6587\u4ef6\u8282\u70b9",
              "relforcerowsecurity":"\u5f3a\u5236\u884c\u7ea7\u5b89\u5168",
              "relfrozenxid":"\u51bb\u7ed3\u4e8b\u52a1ID",
              "relhasindex":"\u62e5\u6709\u7d22\u5f15",
              "relhasrules":"\u5e26\u6709\u89c4\u5219",
              "relhassubclass":"\u62e5\u6709\u5b50\u7c7b",
              "relhastriggers":"\u5e26\u89e6\u53d1\u5668",
              "relispopulated":"\u5df2\u88ab\u586b\u5145",
              "relisshared":"\u8de8\u5e93\u5171\u4eab",
              "relminmxid":"\u4e8c\u9636\u6bb5\u4e8b\u52a1ID",
              "relnamespace":"\u6a21\u5f0fID",
              "relnatts":"\u5217\u6570",
              "reloftype":"\u590d\u5408\u7c7b\u578bID",
              "relowner":"\u8868\u5c5e\u4e3bID",
              "relpages":"\u9875\u9762\u6570\u91cf",
              "relrowsecurity":"\u884c\u7ea7\u5b89\u5168",
              "reltablespace":"\u8868\u7a7a\u95f4ID",
              "reltoastrelid":"TOAST\u8868ID",
              "reltuples":"\u5143\u7ec4\u6570\u91cf",
              "reltype":"\u884c\u7c7b\u578bID",
              "value":"\u53d6\u503c"
            }
          }
        }
      ],
      "type":"stat"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":22},"id":63,"panels":[],"title":"Table Meta","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"mappings":[],"noValue":"N/A","thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Bloat Ratio"},"properties":[{"id":"unit","value":"percentunit"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#fcdb72","value":0.2},{"color":"#f79f64","value":0.4},{"color":"red","value":0.6},{"color":"#b783af","value":0.8}]}}]                                       },
          { "matcher":{"id":"byName","options":"Dead Ratio"} ,"properties":[{"id":"unit","value":"percentunit"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#EAB839","value":0.2},{"color":"#EF843C","value":0.4},{"color":"#E24D42","value":0.6},{"color":"#b783af","value":0.8}]}}]                                   },
          { "matcher":{"id":"byName","options":"Size"}       ,"properties":[{"id":"unit","value":"bytes"}]                                                                                                                                                                                                                                                       },
          { "matcher":{"id":"byName","options":"Rows"}       ,"properties":[{"id":"unit","value":"locale"},{"id":"mappings","value":[{"options":{"-1":{"index":0,"text":"Unknown"}},"type":"value"}]}]                                                                                                                                                           },
          { "matcher":{"id":"byName","options":"Age"}        ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"light-green","value":20000000},{"color":"#fcdb72","value":60000000},{"color":"#f79f64","value":200000000},{"color":"#b783af","value":600000000},{"color":"rgb(0, 0, 0)","value":1500000000}]}}] },
          { "matcher":{"id":"byName","options":"Bloat Ratio"},"properties":[{"id":"links","value":[{"title":"PGCAT Bloat","url":"/d/pgcat-bloat?${__url_time_range}"}]}]                                                                                                                                                                                         }
        ]
      },
      "gridPos":{"h":4,"w":24,"x":0,"y":23},
      "id":45,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"center","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"d819469b-9812-4351-b1f6-ed4c555e09ec"},
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT *\nFROM (\n         SELECT relpages ::BIGINT,\n                (relpages * 8192::REAL)    AS relsize,\n                reltuples ::REAL,\n                age(relfrozenxid) ::BIGINT AS age\n         FROM pg_class c\n         WHERE oid = '${oid}'\n         LIMIT 1) a,\n     (\n         SELECT n_live_tup     AS live_tup,\n                n_dead_tup     AS dead_tup,\n                CASE\n                    WHEN (n_live_tup + n_dead_tup) > 0 THEN n_dead_tup::NUMERIC / (n_live_tup + n_dead_tup)\n                    ELSE 0 END AS dead_ratio\n         FROM pg_stat_user_tables\n         WHERE relid = '${oid}'\n         LIMIT 1\n     ) b;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        },{
          "datasource":{"type":"postgres","uid":"d819469b-9812-4351-b1f6-ed4c555e09ec"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "hide":false,
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT ratio AS \"Bloat Ratio\" FROM pg_table_bloat WHERE relname = '${tblname}'",
          "refId":"B",
          "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":"",
      "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"age":3,"dead_tup":5,"live_tup":4,"relpages":2,"relsize":0,"reltuples":1},"renameByName":{"age":"Age","dead_ratio":"Dead Ratio","dead_tup":"Dead Tuple","live_tup":"Live Tuple","relpages":"Page","relsize":"Size","reltuples":"Rows"}}}],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":9,"w":6,"x":0,"y":27},
      "id":11,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT seq_scan,\n       seq_tup_read,\n       idx_scan,\n       idx_tup_fetch,\n       n_tup_ins,\n       n_tup_upd,\n       n_tup_del,\n       n_tup_hot_upd\nFROM pg_stat_user_tables\nWHERE relid = '$oid' LIMIT 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"analyze_count":true,"autoanalyze_count":true,"autovacuum_count":true,"last_analyze":true,"last_autoanalyze":true,"last_autovacuum":true,"last_vacuum":true,"n_ins_since_vacuum":true,"n_mod_since_analyze":true,"relid":true,"relname":true,"schemaname":true,"vacuum_count":true},
            "indexByName":{
              "analyze_count":21,
              "autoanalyze_count":22,
              "autovacuum_count":20,
              "idx_scan":7,
              "idx_tup_fetch":8,
              "last_analyze":17,
              "last_autoanalyze":18,
              "last_autovacuum":16,
              "last_vacuum":15,
              "n_dead_tup":1,
              "n_ins_since_vacuum":14,
              "n_live_tup":0,
              "n_mod_since_analyze":13,
              "n_tup_del":10,
              "n_tup_hot_upd":12,
              "n_tup_ins":9,
              "n_tup_upd":11,
              "relid":2,
              "relname":4,
              "schemaname":3,
              "seq_scan":5,
              "seq_tup_read":6,
              "vacuum_count":19
            },
            "renameByName":{
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "idx_scan":"Index Scan",
              "idx_tup_fetch":"Index Scan Tuples",
              "key":"Item",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "n_dead_tup":"Dead Tuples",
              "n_ins_since_vacuum":"Insert Since Vacuum",
              "n_live_tup":"Live Tuples",
              "n_mod_since_analyze":"Modify Since Analyze",
              "n_tup_del":"Deleted Tuples",
              "n_tup_hot_upd":"Hot-Updated Tuples",
              "n_tup_ins":"Inserted Tuples",
              "n_tup_upd":"Updated Tuples",
              "relid":"",
              "relname":"",
              "schemaname":"",
              "seq_scan":"Seq Scan",
              "seq_tup_read":"Seq Scan Tuples",
              "vacuum_count":"Vacuum Count",
              "value":"Value"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]},"unit":"locale"},"overrides":[]},
      "gridPos":{"h":9,"w":6,"x":6,"y":27},
      "id":39,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[{"format":"table","group":[],"metricColumn":"none","rawQuery":true,"rawSql":"SELECT * FROM pg_statio_user_tables WHERE relid = '${oid}'","refId":"A","select":[[{"params":["value"],"type":"column"}]],"timeColumn":"time","where":[{"name":"$__timeFilter","params":[],"type":"macro"}]}],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"relid":true,"relname":true,"schemaname":true},
            "indexByName":{},
            "renameByName":{
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "heap_blks_hit":"Heap Blocks Hit",
              "heap_blks_read":"Heap Blocks Read",
              "idx_blks_hit":"Index Blocks Hit",
              "idx_blks_read":"Index Blocks Read",
              "idx_scan":"Index Scan",
              "idx_tup_fetch":"Idxscan Tuples",
              "key":"Item",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "n_dead_tup":"Dead Tuples",
              "n_ins_since_vacuum":"Insert Since Vacuum",
              "n_live_tup":"Live Tuples",
              "n_mod_since_analyze":"Modify Since Analyze",
              "n_tup_del":"Deleted Tuples",
              "n_tup_hot_upd":"Hot-Updated Tuples",
              "n_tup_ins":"Inserted Tuples",
              "n_tup_upd":"Updated Tuples",
              "relid":"",
              "relname":"",
              "schemaname":"",
              "seq_scan":"Sequential Scan",
              "seq_tup_read":"Seqscan Tuples",
              "tidx_blks_hit":"Toast Index Blocks Hit",
              "tidx_blks_read":"Toast Index Blocks Read",
              "toast_blks_hit":"Toast Blocks Hit",
              "toast_blks_read":"Toast Blocks Read",
              "vacuum_count":"Vacuum Count",
              "value":"Value"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[{"matcher":{"id":"byRegexp","options":""},"properties":[{"id":"unit","value":"dateTimeFromNow"}]}]},
      "gridPos":{"h":9,"w":6,"x":12,"y":27},
      "id":40,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT vacuum_count + autovacuum_count                   AS vacuum_total,\n       vacuum_count,\n       to_char(last_vacuum, 'YYYY-MM-DD HH24:MI:SS')     AS last_vacuum,\n       date_trunc('second', now() - last_vacuum)         AS since_last_vacuum,\n       autovacuum_count,\n       to_char(last_autovacuum, 'YYYY-MM-DD HH24:MI:SS') AS last_autovacuum,\n       date_trunc('second', now() - last_autovacuum)     AS since_last_autovacuum,\n       n_ins_since_vacuum\nFROM pg_stat_user_tables\nWHERE relid = '$oid'\nLIMIT 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"idx_scan":true,"idx_tup_fetch":true,"n_dead_tup":true,"n_live_tup":true,"n_tup_del":true,"n_tup_hot_upd":true,"n_tup_ins":true,"n_tup_upd":true,"relid":true,"relname":true,"schemaname":true,"seq_scan":true,"seq_tup_read":true},
            "indexByName":{"autovacuum_count":4,"last_autovacuum":5,"last_vacuum":2,"n_ins_since_vacuum":7,"since_last_autovacuum":6,"since_last_vacuum":3,"vacuum_count":1,"vacuum_total":0},
            "renameByName":{
              "analyze_count":"Analyze Count",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "idx_scan":"Index Scan",
              "idx_tup_fetch":"Idxscan Tuples",
              "key":"Item",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "n_dead_tup":"Dead Tuples",
              "n_ins_since_vacuum":"Inserts since Last Vacuum",
              "n_live_tup":"Live Tuples",
              "n_mod_since_analyze":"Modify Since Analyze",
              "n_tup_del":"Deleted Tuples",
              "n_tup_hot_upd":"Hot-Updated Tuples",
              "n_tup_ins":"Inserted Tuples",
              "n_tup_upd":"Updated Tuples",
              "relid":"",
              "relname":"",
              "schemaname":"",
              "seq_scan":"Sequential Scan",
              "seq_tup_read":"Seqscan Tuples",
              "since_last_autovacuum":"Since Last AutoVacuum",
              "since_last_vacuum":"Since Last Vacuum",
              "vacuum_count":"Vacuum Count",
              "vacuum_total":"Vacuums",
              "value":"Value"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"uid":"$dsn"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},"overrides":[]},
      "gridPos":{"h":9,"w":6,"x":18,"y":27},
      "id":41,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT analyze_count + autoanalyze_count                   AS analyze_total,\n       analyze_count,\n       to_char(last_analyze, 'YYYY-MM-DD HH24:MI:SS')     AS last_analyze,\n       date_trunc('second', now() - last_analyze)         AS since_last_analyze,\n       autoanalyze_count,\n       to_char(last_autoanalyze, 'YYYY-MM-DD HH24:MI:SS') AS last_autoanalyze,\n       date_trunc('second', now() - last_autoanalyze)     AS since_last_autoanalyze,\n       n_mod_since_analyze\nFROM pg_stat_user_tables\nWHERE relid = '${oid}'\nLIMIT 1;",
          "refId":"A",
          "select":[[{"params":["value"],"type":"column"}]],
          "timeColumn":"time",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"idx_scan":true,"idx_tup_fetch":true,"n_dead_tup":true,"n_live_tup":true,"n_tup_del":true,"n_tup_hot_upd":true,"n_tup_ins":true,"n_tup_upd":true,"relid":true,"relname":true,"schemaname":true,"seq_scan":true,"seq_tup_read":true},
            "indexByName":{"analyze_count":1,"analyze_total":0,"autoanalyze_count":4,"last_analyze":2,"last_autoanalyze":5,"n_mod_since_analyze":7,"since_last_analyze":3,"since_last_autoanalyze":6},
            "renameByName":{
              "analyze_count":"Analyze Count",
              "analyze_total":"Analyzes",
              "autoanalyze_count":"AutoAnalyze Count",
              "autovacuum_count":"AutoVacuum Count",
              "idx_scan":"Index Scan",
              "idx_tup_fetch":"Idxscan Tuples",
              "key":"Item",
              "last_analyze":"Last Analyze",
              "last_autoanalyze":"Last AutoAnalyze",
              "last_autovacuum":"Last AutoVacuum",
              "last_vacuum":"Last Vacuum",
              "n_dead_tup":"Dead Tuples",
              "n_ins_since_vacuum":"Inserts since Last Vacuum",
              "n_live_tup":"Live Tuples",
              "n_mod_since_analyze":"Modify Since Analyze",
              "n_tup_del":"Deleted Tuples",
              "n_tup_hot_upd":"Hot-Updated Tuples",
              "n_tup_ins":"Inserted Tuples",
              "n_tup_upd":"Updated Tuples",
              "relid":"",
              "relname":"",
              "schemaname":"",
              "seq_scan":"Sequential Scan",
              "seq_tup_read":"Seqscan Tuples",
              "since_last_analyze":"Last Analyze Elapse",
              "since_last_autoanalyze":"Last AutoAnalyze Elapse",
              "since_last_autovacuum":"Last AutoVacuum Elapse",
              "since_last_vacuum":"Last Vacuum Elapse",
              "vacuum_count":"Vacuum Count",
              "value":"Value"
            }
          }
        }
      ],
      "type":"stat"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":36},"id":57,"panels":[],"title":"Indexes","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Index ID"}                   ,"properties":[{"id":"custom.width","value":90}]                                                                                                                                                                                                         },
          { "matcher":{"id":"byName","options":"Schema"}                     ,"properties":[{"id":"custom.width","value":100}]                                                                                                                                                                                                        },
          { "matcher":{"id":"byName","options":"Index"}                      ,"properties":[{"id":"links","value":[{"title":"${__data.fields.Define}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Index}"}]},{"id":"custom.minWidth","value":200},{"id":"custom.align","value":"left"}]                     },
          { "matcher":{"id":"byName","options":"Define"}                     ,"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.align","value":"left"},{"id":"custom.minWidth","value":350},{"id":"custom.inspect","value":true}]                                                                       },
          { "matcher":{"id":"byRegexp","options":"/Scan|Tup Read|Tup Fetch/"},"properties":[{"id":"custom.width","value":110},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#747474b3"},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}] }
        ]
      },
      "gridPos":{"h":7,"w":24,"x":0,"y":37},
      "id":55,
      "options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":true,"displayName":"Scan"}]},
      "pluginVersion":"12.0.0",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT schemaname || '.' || indexrelname AS \"Index\", \n       schemaname || '.' || relname AS \"Table\", \n       *,\n       pg_get_indexdef(indexrelid) AS def\nFROM pg_stat_user_indexes\nWHERE relid = '${oid}' AND\nschemaname !~ '^pg_' AND schemaname !~ '^_' AND schemaname !~ '^timescaledb' AND schemaname !~ '^citus' AND schemaname !~ '^columnar' \nAND schemaname NOT IN ('pg_catalog','information_schema');",
          "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":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{                 "Table":true   ,                                                                           "indexrelname":true,                          "relid":true      ,                        "relname":true,"schemaname":true },
            "indexByName"  :{ "Index":1      ,"Table":0      ,              "def":2       ,"idx_scan":8     ,"idx_tup_fetch":10         ,"indexrelname":5   ,"idx_tup_read":9         ,"relid":7         ,"indexrelid":6         ,"relname":3   ,"schemaname":4    },
            "renameByName" :{ "Index":"Index","Table":"Table","Name":"Name","def":"Define","idx_scan":"Scan","idx_tup_fetch":"Tup Fetch","indexrelname":""  ,"idx_tup_read":"Tup Read","relid":"Table ID","indexrelid":"Index ID","relname":""  ,"schemaname":""   }
          }
        }
      ],
      "type":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":44},"id":58,"panels":[],"title":"Column Stat","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"$dsn"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"filterable":false,"inspect":false},"mappings":[{"options":{"match":"null","result":{"color":"#e3e3e3e0","index":0}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
        "overrides":[
          {"matcher":{"id":"byName","options":"No"},"properties":[{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.minWidth","value":150},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {
            "matcher":{"id":"byName","options":"Inhreited"},
            "properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"false":{"color":"transparent","index":1,"text":"False"},"true":{"color":"#f79f64","index":0,"text":"True"}},"type":"value"},{"options":{"match":"null","result":{"color":"#e3e3e3e0","index":2}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
          },
          {"matcher":{"id":"byName","options":"Correlation"},"properties":[{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"custom.width","value":120},{"id":"min","value":-1},{"id":"color","value":{"mode":"continuous-RdYlGr"}},{"id":"max","value":1},{"id":"unit","value":"percentunit"}]},
          {
            "matcher":{"id":"byName","options":"Dim"},
            "properties":[{"id":"custom.width","value":60},{"id":"mappings","value":[{"options":{"0":{"color":"rgba(128, 128, 128, 0.5)","index":0,"text":"N"},"1":{"color":"super-light-green","index":1,"text":"1"},"2":{"color":"super-light-blue","index":2,"text":"2"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
          },{
            "matcher":{"id":"byName","options":"Avg Width"},
            "properties":[
              {"id":"custom.width","value":100},{"id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}},
              {
                "id":"thresholds",
                "value":{
                  "mode":"absolute",
                  "steps":[
                    { "color":"#3e668f"                        },{ "color":"super-light-blue" ,"value":   2 },{ "color":"super-light-green","value":   4 },{ "color":"#346f36cc"        ,"value":   8 },{ "color":"dark-green"       ,"value":  16 },{ "color":"#fcdb72"          ,"value":  32 },{ "color":"dark-yellow"      ,"value":  64 },{ "color":"#f79f64"          ,"value": 128 },
                    { "color":"dark-orange"      ,"value": 256 },{ "color":"super-light-red"  ,"value": 512 },{ "color":"red"              ,"value":1024 },{ "color":"#b783af"          ,"value":2048 }
                  ]
                }
              }
            ]
          },
          {"matcher":{"id":"byName","options":"MCV"},"properties":[{"id":"custom.inspect","value":true},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Correlation"},"properties":[{"id":"custom.width","value":90}]},
          {"matcher":{"id":"byName","options":"Null Frac"},"properties":[{"id":"custom.width","value":100},{"id":"color","value":{"mode":"continuous-GrYlRd"}},{"id":"min","value":0},{"id":"max","value":1},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"unit","value":"percentunit"}]},
          {"matcher":{"id":"byName","options":"Avg Width"},"properties":[{"id":"custom.width","value":100},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"N Distinct"},"properties":[{"id":"custom.width","value":100},{"id":"mappings","value":[{"options":{"-1":{"color":"#f79f64","index":0,"text":"Distinct"}},"type":"value"},{"options":{"from":-1,"result":{"color":"#3e668f","index":1},"to":0},"type":"range"},{"options":{"from":0,"result":{"color":"#346f36cc","index":2}},"type":"range"}]}]},
          {"matcher":{"id":"byName","options":"MCF"},"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.inspect","value":true}]},{"matcher":{"id":"byName","options":"Histogram"},"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.inspect","value":true}]}
        ]
      },
      "gridPos":{"h":13,"w":24,"x":0,"y":45},
      "id":52,
      "options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":false,"displayName":"No"}]},
      "pluginVersion":"10.1.5",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"f5cbdb82-0e9e-4c7c-8586-2bc16a1647ca"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "hide":false,
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT a.attnum, b.* FROM\n(SELECT * FROM pg_attribute a WHERE attrelid = '$oid' AND attnum > 0) a LEFT JOIN\n(SELECT * FROM pg_stats WHERE schemaname = '$nspname' AND tablename = '$tblname') b\nON a.attname = b.attname ORDER BY 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"}]
        }
      ],
      "title":"",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{
              "attacl":true,
              "attbyval":true,
              "attcacheoff":true,
              "attcollation":true,
              "attfdwoptions":true,
              "attgenerated":true,
              "atthasdef":true,
              "atthasmissing":true,
              "attidentity":true,
              "attinhcount":true,
              "attislocal":true,
              "attmissingval":true,
              "attoptions":true,
              "attrelid":true,
              "attstattarget":true,
              "atttypmod":true,
              "elem_count_histogram":true,
              "inherited":false,
              "most_common_elem_freqs":true,
              "most_common_elems":true,
              "schemaname":true,
              "tablename":true
            },
            "indexByName":{"attname":1,"attnum":0,"avg_width":6,"correlation":3,"elem_count_histogram":12,"histogram_bounds":9,"inherited":2,"most_common_elem_freqs":11,"most_common_elems":10,"most_common_freqs":8,"most_common_vals":7,"n_distinct":5,"null_frac":4,"schemaname":13,"tablename":14},
            "renameByName":{
              "attacl":"",
              "attalign":"Align",
              "attcollation":"Collation",
              "atthasdef":"",
              "attidentity":"ID",
              "attisdropped":"Drop",
              "attlen":"Len",
              "attname":"Name",
              "attndims":"Dim",
              "attnotnull":"NOT NULL",
              "attnum":"No",
              "attstorage":"Storage",
              "atttype":"Type",
              "atttypid":"TypeID",
              "avg_width":"Avg Width",
              "correlation":"Correlation",
              "def":"Default",
              "elem_count_histogram":"ECH",
              "histogram_bounds":"Histogram",
              "inherited":"Inhreited",
              "most_common_elem_freqs":"MCEF",
              "most_common_elems":"MCE",
              "most_common_freqs":"MCF",
              "most_common_vals":"MCV",
              "n_distinct":"N Distinct",
              "null_frac":"Null Frac",
              "schemaname":""
            }
          }
        }
      ],
      "type":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":58},"id":59,"panels":[],"title":"Relate SQL","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
        "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"},{"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":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"}]}}]},
          {"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"color":"#7d7d7d33","value":1e-07}]}}]}
        ]
      },
      "gridPos":{"h":11,"w":24,"x":0,"y":59},
      "id":60,
      "options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":true,"displayName":"RT:avg"}]},
      "pluginVersion":"10.0.3",
      "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 query ~ '$tblname'\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":"",
      "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"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":41,
  "tags":["Pigsty","PGSQL","PGCAT","Database","Table"],
  "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 nspname || '.' || relname FROM pg_namespace nsp JOIN pg_class rel ON nsp.oid = rel.relnamespace\nWHERE nspname NOT IN ('pg_catalog', 'monitor', 'information_schema','pg_toast') AND relkind = ANY(ARRAY['r', 'm', 't', 'p'] )\nAND nspname !~ '^pg_' AND nspname !~ '^_' AND nspname !~ '^timescaledb' AND nspname !~ '^citus' AND nspname !~ '^columnar'",
        "description":"Schema qualified relation name",
        "includeAll":false,
        "label":"Relation",
        "name":"relname",
        "options":[],
        "query":"SELECT nspname || '.' || relname FROM pg_namespace nsp JOIN pg_class rel ON nsp.oid = rel.relnamespace\nWHERE nspname NOT IN ('pg_catalog', 'monitor', 'information_schema','pg_toast') AND relkind = ANY(ARRAY['r', 'm', 't', 'p'] )\nAND nspname !~ '^pg_' AND nspname !~ '^_' AND nspname !~ '^timescaledb' AND nspname !~ '^citus' AND nspname !~ '^columnar'",
        "refresh":1,
        "regex":"",
        "sort":1,
        "type":"query"
      },
      {"current":{},"datasource":{"uid":"$dsn"},"definition":"SELECT '$relname';","description":"schema/namespace name","hide":2,"includeAll":false,"label":"Schema","name":"nspname","options":[],"query":"SELECT '$relname';","refresh":1,"regex":"/(\\S+)\\.\\S+/","sort":1,"type":"query"},
      {"current":{},"datasource":{"uid":"$dsn"},"definition":"SELECT '$relname';","description":"relname without schema","hide":2,"includeAll":false,"label":"Raw Relation","name":"tblname","options":[],"query":"SELECT '$relname';","refresh":1,"regex":"/\\S+\\.(\\S+)/","sort":1,"type":"query"},
      {
        "current":{},
        "datasource":{"uid":"$dsn"},
        "definition":"SELECT rel.oid AS oid FROM pg_namespace nsp JOIN pg_class rel ON nsp.oid = rel.relnamespace WHERE nspname = '${nspname}' AND relname = '${tblname}';",
        "description":"Table OID",
        "hide":2,
        "includeAll":false,
        "label":"Table OID",
        "name":"oid",
        "options":[],
        "query":"SELECT rel.oid AS oid FROM pg_namespace nsp JOIN pg_class rel ON nsp.oid = rel.relnamespace WHERE nspname = '${nspname}' AND relname = '${tblname}';",
        "refresh":1,
        "regex":"",
        "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 Table",
  "uid":"pgcat-table",
  "version":1
}