{
  "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 Single Database",
  "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":202,"panels":[],"title":"Overview","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","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGCAT Instance : ${dsn:text}","url":"/d/pgcat-instance?var-dsn=${dsn:text}&${__url_time_range}"}]}]                                              },
          { "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"mappings","value":[{"options":{"monitor":{"color":"#5b9cd5","index":1},"public":{"color":"#f79f64","index":0},"repack":{"color":"#d0475799","index":2}},"type":"value"}]}] },
          { "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}"}]}]                                  }
        ]
      },
      "gridPos":{"h":6,"w":6,"x":0,"y":1},
      "id":205,
      "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.1",
      "targets":[
        { "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Schema","type":"string","values":["${schema}"]}],"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" }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Schemas of current database ${datname}",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                         },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#5b9cd5","index":0},"repack":{"color":"#b783af","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"auto"}                                                                                                                                                                                                                            },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                    },
              { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${ins}.${datname}.${__data.fields.Schema}","url":"/d/pgcat-schema?var-dsn=${ins}.${datname}&var-schema=${__data.fields.Schema}"}]                                                                                },
              { "id":"custom.minWidth"   ,"value":200                                                                                                                                                                                                                                        },
              { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                       }
            ]
          },{
            "matcher":{"id":"byName","options":"Owner"},
            "properties":[
              {"id":"custom.align","value":"center"},{"id":"custom.cellOptions","value":{"type":"color-text"}},
              {
                "id":"mappings",
                "value":[
                  { "options":{"dbuser_dba":{"color":"#cc4637d9","index":1},"postgres":{"color":"#b783af","index":0}},"type":"value" },{ "options":{"pattern":"replicator","result":{"color":"#fcdb72","index":2}}                        ,"type":"regex" },{ "options":{"pattern":"dbuser_monitor","result":{"color":"#f79f64","index":3}}                    ,"type":"regex" },
                  { "options":{"pattern":"dbrole.*","result":{"color":"#3e668f","index":4}}                          ,"type":"regex" },{ "options":{"pattern":"dbuser.*","result":{"color":"#346f36cc","index":5}}                        ,"type":"regex" },{ "options":{"pattern":"pg_database_owner","result":{"color":"#5b9cd5","index":6}}                 ,"type":"regex" }
                ]
              },
              {"id":"custom.width","value":200},{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}},{"id":"custom.filterable","value":true}
            ]
          },
          {"matcher":{"id":"byName","options":"Objects"},"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"OID"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},
          {"matcher":{"id":"byType","options":"number"},"properties":[{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7a7a7a40","value":0},{"color":"#3e668f","value":1}]}}]},{"matcher":{"id":"byRegexp","options":"/Table|Index|Toast|View/"},"properties":[{"id":"custom.width","value":80}]},
          {"matcher":{"id":"byName","options":"Sequence"},"properties":[{"id":"custom.width","value":90}]},{"matcher":{"id":"byName","options":"Materialized View"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Compose Type"},"properties":[{"id":"custom.width","value":140}]},
          {"matcher":{"id":"byName","options":"Partitioned Table"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Partitioned Index"},"properties":[{"id":"custom.width","value":145}]},{"matcher":{"id":"byName","options":"Foreign Table"},"properties":[{"id":"custom.width","value":120}]}
        ]
      },
      "gridPos":{"h":6,"w":12,"x":6,"y":1},
      "id":200,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Schema"}]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT\n       relnamespace AS \"OID\", nspname AS \"Schema\", nspowner::RegRole::TEXT AS \"Owner\",\n       coalesce((data ->> 'r')::INTEGER, 0) AS \"r\",\n       coalesce((data ->> 'i')::INTEGER, 0) AS \"i\",\n       coalesce((data ->> 'S')::INTEGER, 0) AS \"S\",\n       coalesce((data ->> 't')::INTEGER, 0) AS \"t\",\n       coalesce((data ->> 'v')::INTEGER, 0) AS \"v\",\n       coalesce((data ->> 'm')::INTEGER, 0) AS \"m\",\n       coalesce((data ->> 'c')::INTEGER, 0) AS \"c\",\n       coalesce((data ->> 'f')::INTEGER, 0) AS \"f\",\n       coalesce((data ->> 'p')::INTEGER, 0) AS \"p\",\n       coalesce((data ->> 'I')::INTEGER, 0) AS \"I\"\nFROM (\n         SELECT relnamespace, json_object_agg(kind, count) AS data\n         FROM (SELECT relnamespace, relkind::TEXT AS kind, count(*) AS count FROM pg_class GROUP BY relnamespace,relkind) d\n         GROUP BY relnamespace\n     ) j LEFT JOIN pg_namespace nsp ON j.relnamespace = nsp.oid\nWHERE nspname NOT IN ('pg_toast', 'information_schema', 'pg_catalog');",
          "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":{"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,"datcollate":true,"datctype":true,"datfrozenxid":true,"description":true,"encoding":true,"tablespace":true},
            "indexByName":{"I":12,"OID":0,"Owner":2,"S":5,"Schema":1,"c":9,"f":10,"i":4,"m":8,"p":11,"r":3,"t":6,"v":7},
            "renameByName":{
              "I":"Partitioned Index",
              "OID":"OID",
              "Owner":"Owner",
              "S":"Sequence",
              "Schema":"Schema",
              "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",
              "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",
              "m":"Materialized View",
              "owner":"Owner",
              "p":"Partitioned Table",
              "r":"Table",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "t":"Toast",
              "tablespace":"Tablespace",
              "v":"View"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"fixedColor":"#3e668f","mode":"fixed"},"mappings":[],"noValue":"No Privilege Set","thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},"overrides":[]},
      "gridPos":{"h":6,"w":6,"x":18,"y":1},
      "id":150,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":16,"valueSize":16},"textMode":"value","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"cc8a3615-9c82-44d7-be42-07d8aa1cac68"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"select unnest(nspacl) from pg_namespace WHERE nspname = '$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"}]
        }
      ],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"datname"}},
        {
          "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,"age":true,"datconnlimit":true,"datfrozenxid":true,"datname":false,"sessions":true,"size":true,"status":true},
            "indexByName":{"acl":12,"age":3,"datcollate":8,"datconnlimit":6,"datctype":9,"datfrozenxid":10,"datname":0,"description":13,"encoding":7,"owner":1,"sessions":5,"size":4,"status":2,"tablespace":11},
            "renameByName":{
              "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",
              "datallowconn":"AllowConn",
              "datcollate":"Collate",
              "datconnlimit":"ConnLimit",
              "datctype":"Ctype",
              "datfrozenxid":"FronzenXID",
              "datname":"Database",
              "description":"Description",
              "encoding":"Encoding",
              "host":"Target",
              "owner":"Owner",
              "real_datname":"Datname",
              "sessions":"Session",
              "size":"Size",
              "status":"Status",
              "tablespace":"Tablespace"
            }
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"0":{"color":"#6c6c6ce0","index":0}},"type":"value"}],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},"overrides":[]},
      "gridPos":{"h":3,"w":24,"x":0,"y":7},
      "id":201,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":[],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":12},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "hide":false,
          "rawQuery":true,
          "rawSql":"SELECT coalesce((data ->> 'r')::INTEGER, 0) AS \"r\",\n       coalesce((data ->> 'i')::INTEGER, 0) AS \"i\",\n       coalesce((data ->> 'S')::INTEGER, 0) AS \"S\",\n       coalesce((data ->> 't')::INTEGER, 0) AS \"t\",\n       coalesce((data ->> 'v')::INTEGER, 0) AS \"v\",\n       coalesce((data ->> 'm')::INTEGER, 0) AS \"m\",\n       coalesce((data ->> 'c')::INTEGER, 0) AS \"c\",\n       coalesce((data ->> 'f')::INTEGER, 0) AS \"f\",\n       coalesce((data ->> 'p')::INTEGER, 0) AS \"p\",\n       coalesce((data ->> 'I')::INTEGER, 0) AS \"I\"\nFROM (\n         SELECT json_object_agg(kind, count) AS data\n         FROM (SELECT relkind::TEXT AS kind, count(*) AS count FROM pg_class \n         WHERE relnamespace = '$nspid'\n         GROUP BY relkind) d\n     ) j;",
          "refId":"A",
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50}
        }
      ],
      "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"I":9,"S":2,"c":5,"f":7,"i":1,"m":4,"p":8,"r":0,"t":6,"v":3},"renameByName":{"I":"P Index","S":"Seq","c":"C Type","f":"F Table","i":"Index","m":"M View","p":"P Table","r":"Table","t":"Toast","v":"View"}}}],
      "type":"stat"
    },
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"text","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
              { "id":"custom.width"      ,"value":200                                                                                                                                                                                                                                          }
            ]
          },
          {"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":300},{"id":"links","value":[{"title":"PGCAT Table : ${__data.fields.Name}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Name}"}]}]},
          {
            "matcher":{"id":"byName","options":"Age"},
            "properties":[
              { "id":"custom.width"      ,"value":135                                                                                                                                                                                                                               },
              { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                     },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":0.05},{"color":"#f79f64","value":0.1},{"color":"#cc4637d9","value":0.3},{"color":"#b783af","value":0.9},{"color":"#000000","value":0.99}]} },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                             },
              { "id":"color"                                                                                                                                                                                                                                                        },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                 },
              { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                                             }
            ]
          },{
            "matcher":{"id":"byName","options":"Tuples"},
            "properties":[
              { "id":"custom.width"      ,"value":120                                                                                                                                                                                                                                                   },
              { "id":"unit"              ,"value":"locale"                                                                                                                                                                                                                                              },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":10000},{"color":"#fcdb72","value":1000000},{"color":"#f79f64","value":100000000},{"color":"#cc4637d9","value":10000000000}]} },
              { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"},"0":{"color":"#00000000","index":1,"text":"0"}},"type":"value"}]                                                                                                                     },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                 }
            ]
          },{
            "matcher":{"id":"byName","options":"Size"},
            "properties":[
              { "id":"custom.width"      ,"value":110                                                                                                                                                                                                                                                           },
              { "id":"unit"              ,"value":"bytes"                                                                                                                                                                                                                                                       },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":8193},{"color":"#fcdb72","value":10000000000},{"color":"#f79f64","value":100000000000},{"color":"#cc4637d9","value":1000000000000}]} },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                         },
              { "id":"color"                                                                                                                                                                                                                                                                                    }
            ]
          },
          {"matcher":{"id":"byName","options":"nAttr"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#f79f64","value":16},{"color":"#cc4637d9","value":32}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {
            "matcher":{"id":"byName","options":"Kind"},
            "properties":[
              {"id":"custom.width","value":150},
              {
                "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":"Index"             },
                      "m":{ "color":"dark-blue"         ,"index": 5,"text":"Materialized View" },
                      "p":{ "color":"#284766"           ,"index": 8,"text":"Partitioned Table" },
                      "r":{ "color":"#3e668f"           ,"index": 0,"text":"Table"             },
                      "t":{ "color":"#808080"           ,"index": 3,"text":"Toast Table"       },
                      "v":{ "color":"red"               ,"index": 4,"text":"View"              }
                    },
                    "type":"value"
                  }
                ]
              },
              {"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}
            ]
          },
          {"matcher":{"id":"byName","options":"Persist"},"properties":[{"id":"custom.width","value":90},{"id":"mappings","value":[{"options":{"p":{"color":"#3e668f","index":0,"text":"permanent"},"t":{"color":"#346f36cc","index":2,"text":"temporary"},"u":{"color":"#f79f64","index":1,"text":"unlogged"}},"type":"value"}]},{"id":"custom.filterable","value":true}]},
          {"matcher":{"id":"byName","options":"Identity"},"properties":[{"id":"mappings","value":[{"options":{"d":{"color":"#3e668f","index":0,"text":"Default"},"f":{"color":"#cc4637d9","index":2,"text":"Full"},"i":{"color":"#346f36cc","index":3,"text":"Index"},"n":{"color":"#b783af","index":1,"text":"Nothing"}},"type":"value"}]},{"id":"custom.width","value":100},{"id":"custom.filterable","value":true}]},
          {"matcher":{"id":"byType","options":"boolean"},"properties":[{"id":"mappings","value":[{"options":{"false":{"color":"#3e668f","index":0,"text":"False"},"true":{"color":"#346f36cc","index":1,"text":"True"}},"type":"value"}]},{"id":"custom.width","value":100}]},{"matcher":{"id":"byName","options":"OID"},"properties":[{"id":"custom.width","value":100}]},
          {"matcher":{"id":"byName","options":"Filenode"},"properties":[{"id":"custom.width","value":100}]},{"matcher":{"id":"byType","options":"number"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.width","value":100},{"id":"unit","value":"locale"}]},
          {"matcher":{"id":"byName","options":"Age"},"properties":[{"id":"custom.width","value":120},{"id":"mappings","value":[{"options":{"2147483647":{"color":"#e3e3e3e0","index":0,"text":"N/A"}},"type":"value"}]}]},{"matcher":{"id":"byName","options":"ACL"},"properties":[{"id":"custom.inspect","value":true}]},
          {"matcher":{"id":"byName","options":"Options"},"properties":[{"id":"custom.inspect","value":true}]},{"matcher":{"id":"byName","options":"Owner"},"properties":[{"id":"custom.minWidth","value":120},{"id":"custom.filterable","value":true}]}
        ]
      },
      "gridPos":{"h":13,"w":24,"x":0,"y":10},
      "id":198,
      "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Kind"}]},
      "pluginVersion":"12.3.1",
      "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 \n*, '$schema' || '.' || relname AS \"Name\", relowner::RegRole AS \"Owner\",\npg_relation_size(oid) AS Size, age(relfrozenxid) AS age\nFROM pg_class\nWHERE relnamespace = '$nspid';",
          "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":"Class",
      "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":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":23},"id":152,"panels":[],"title":"Table","type":"row"},
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Tables of current database ${datname}",
      "fieldConfig":{
        "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          {
            "matcher":{"id":"byName","options":"Schema"},
            "properties":[
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
              { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
              { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
              { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
              { "id":"custom.width"      ,"value":200                                                                                                                                                                                                                                          }
            ]
          },
          {"matcher":{"id":"byName","options":"Name"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":300},{"id":"links","value":[{"title":"PGCAT Table : ${__data.fields.Name}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Name}"}]}]},
          {"matcher":{"id":"byName","options":"OID"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"color","value":{"fixedColor":"#3e668f","mode":"thresholds"}}]},
          {"matcher":{"id":"byType","options":"number"},"properties":[{"id":"custom.width","value":70},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}}]},
          {
            "matcher":{"id":"byName","options":"Age"},
            "properties":[
              { "id":"custom.width"      ,"value":70                                                                                                                                                                                                                                },
              { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                     },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":0.05},{"color":"#f79f64","value":0.1},{"color":"#cc4637d9","value":0.3},{"color":"#b783af","value":0.9},{"color":"#000000","value":0.99}]} },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                             },
              { "id":"color"                                                                                                                                                                                                                                                        },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                 },
              { "id":"color"             ,"value":{"mode":"thresholds"}                                                                                                                                                                                                             }
            ]
          },{
            "matcher":{"id":"byName","options":"Tuples"},
            "properties":[
              { "id":"custom.width"      ,"value":80                                                                                                                                                                                                                                                    },
              { "id":"unit"              ,"value":"short"                                                                                                                                                                                                                                               },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":10000},{"color":"#fcdb72","value":1000000},{"color":"#f79f64","value":100000000},{"color":"#cc4637d9","value":10000000000}]} },
              { "id":"mappings"          ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"},"0":{"color":"#00000000","index":1,"text":"0"}},"type":"value"}]                                                                                                                     },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                 }
            ]
          },{
            "matcher":{"id":"byName","options":"Size"},
            "properties":[
              { "id":"custom.width"      ,"value":110                                                                                                                                                                                                                                                           },
              { "id":"unit"              ,"value":"bytes"                                                                                                                                                                                                                                                       },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":8193},{"color":"#fcdb72","value":10000000000},{"color":"#f79f64","value":100000000000},{"color":"#cc4637d9","value":1000000000000}]} },
              { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                                         },
              { "id":"color"                                                                                                                                                                                                                                                                                    }
            ]
          },
          {"matcher":{"id":"byName","options":"nAttr"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#f79f64","value":16},{"color":"#cc4637d9","value":32}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byType","options":"time"},"properties":[{"id":"unit","value":"dateTimeFromNow"},{"id":"custom.width","value":160},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
          {"matcher":{"id":"byName","options":"Seq Scan"},"properties":[{"id":"custom.width","value":110},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#FF780A","value":1},{"color":"#cc4637d9","value":1000},{"color":"#b783af","value":1000000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {
            "matcher":{"id":"byName","options":"Kind"},
            "properties":[
              {"id":"custom.width","value":150},
              {
                "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":"Index"             },
                      "m":{ "color":"dark-blue"         ,"index": 5,"text":"Materialized View" },
                      "p":{ "color":"#284766"           ,"index": 8,"text":"Partitioned Table" },
                      "r":{ "color":"#3e668f"           ,"index": 0,"text":"Table"             },
                      "t":{ "color":"#808080"           ,"index": 3,"text":"Toast Table"       },
                      "v":{ "color":"red"               ,"index": 4,"text":"View"              }
                    },
                    "type":"value"
                  }
                ]
              },
              {"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}
            ]
          },
          {"matcher":{"id":"byName","options":"Insert"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"locale"}]},{"matcher":{"id":"byName","options":"Update"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"locale"}]},{"matcher":{"id":"byName","options":"Delete"},"properties":[{"id":"custom.width","value":63}]},
          {
            "matcher":{"id":"byName","options":"Live"},
            "properties":[{"id":"custom.width","value":128},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"transparent","value":0},{"color":"#3e668f","value":1},{"color":"#346f36cc","value":10000},{"color":"#fcdb72","value":1000000},{"color":"#f79f64","value":100000000},{"color":"#cc4637d9","value":10000000000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
          },
          {"matcher":{"id":"byName","options":"Dead"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#3e668f","value":1},{"color":"#f79f64","value":10000}]}}]},
          {"matcher":{"id":"byRegexp","options":"/Scan|Seq ScanIdx Scan|Inserted|Updated|Deleted|Scan Rows|Index Rows|HOT Update|Modified/"},"properties":[{"id":"custom.width","value":120},{"id":"unit","value":"locale"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byName","options":"Deleted"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":1}]}}]},{"matcher":{"id":"byName","options":"Updated"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#b783af","value":1}]}}]},
          {"matcher":{"id":"byName","options":"Scan Rows"},"properties":[{"id":"custom.width","value":120}]},{"matcher":{"id":"byName","options":"Index Rows"},"properties":[{"id":"custom.width","value":120}]},{"matcher":{"id":"byName","options":"Filenode"},"properties":[{"id":"custom.width","value":80},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},
          {"matcher":{"id":"byRegexp","options":"/(.*Analyze|Vacuum).*Count/"},"properties":[{"id":"custom.width","value":160},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byName","options":"nInsSinceVacuum"},"properties":[{"id":"custom.width","value":140},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":80}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
          {"matcher":{"id":"byName","options":"nModSinceAnalyze"},"properties":[{"id":"custom.width","value":140},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#7f7f7fc4","value":0},{"color":"#cc4637d9","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]}
        ]
      },
      "gridPos":{"h":9,"w":24,"x":0,"y":24},
      "id":189,
      "options":{"cellHeight":"sm","enablePagination":false,"showHeader":true,"sortBy":[{"desc":true,"displayName":"Size"}]},
      "pluginVersion":"12.3.1",
      "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 c.oid,\n       n.nspname,\n       n.nspname || '.' || c.relname                        AS name,\n       CASE WHEN relispartition THEN 'P' ELSE c.relkind END AS kind,\n       age(c.relfrozenxid)::FLOAT / 2147483648              AS relage,\n       (n_tup_ins + n_tup_upd + n_tup_del)                  AS n_tup_mod,\n       seq_scan + idx_scan                                  AS tbl_scan,\n       seq_tup_read + idx_tup_fetch                         AS tup_read,\n       reltuples,\n       relpages,\n       relfilenode,\n       pg_table_size(c.oid)                                 AS size,\n       relnatts,\n       s.seq_scan,\n       s.seq_tup_read,\n       s.idx_scan,\n       s.idx_tup_fetch,\n       s.n_tup_ins,\n       s.n_tup_upd,\n       s.n_tup_del,\n       s.n_tup_hot_upd,\n       -- s.n_tup_newpage_upd, -- PG16\n       s.n_live_tup,\n       s.n_dead_tup,\n       s.n_mod_since_analyze,\n       -- s.n_ins_since_vacuum, -- PG13\n       extract(EPOCH FROM s.last_vacuum) * 1000             AS last_vacuum,\n       extract(EPOCH FROM s.last_autovacuum) * 1000         AS last_autovacuum,\n       extract(EPOCH FROM s.last_analyze) * 1000            AS last_analyze,\n       extract(EPOCH FROM s.last_autoanalyze) * 1000        AS last_autoanalyze,\n       s.vacuum_count,\n       s.autovacuum_count,\n       s.analyze_count,\n       s.autoanalyze_count\nFROM pg_catalog.pg_class c\n         LEFT JOIN pg_namespace n ON n.oid = c.relnamespace\n         LEFT JOIN pg_stat_user_tables s ON c.oid = s.relid\nWHERE c.relkind IN ('r', 'p', '')\n  AND schemaname = '$schema'\nORDER BY 1, 2;\n\n\n",
          "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":"Tables",
      "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,
              "relam":true,
              "relfilenode":false,
              "relid":true,
              "relname":true,
              "relnamespace":true,
              "reloftype":true,
              "relpages":true,
              "reltype":true,
              "schemaname":true,
              "seq_tup_read":false,
              "tablespace":true,
              "vacuum_count":false
            },
            "indexByName":{
              "analyze_count":32,
              "autoanalyze_count":34,
              "autovacuum_count":29,
              "idx_scan":14,
              "idx_tup_fetch":16,
              "kind":3,
              "last_analyze":33,
              "last_autoanalyze":35,
              "last_autovacuum":30,
              "last_vacuum":28,
              "n_dead_tup":10,
              "n_ins_since_vacuum":26,
              "n_live_tup":9,
              "n_mod_since_analyze":31,
              "n_tup_del":20,
              "n_tup_hot_upd":22,
              "n_tup_ins":19,
              "n_tup_mod":18,
              "n_tup_upd":21,
              "name":1,
              "nspname":2,
              "oid":0,
              "relage":7,
              "relfilenode":5,
              "relid":23,
              "relname":25,
              "relnatts":6,
              "relpages":11,
              "reltuples":8,
              "schemaname":24,
              "seq_scan":13,
              "seq_tup_read":15,
              "size":4,
              "tbl_scan":12,
              "tup_read":17,
              "vacuum_count":27
            },
            "renameByName":{
              "I":"Partitioned Index",
              "Kind":"Kind",
              "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",
              "relage":"Age",
              "relfilenode":"Filenode",
              "relhasindex":"",
              "relid":"",
              "relkind":"Kind",
              "relname":"",
              "relnatts":"nAttr",
              "relpages":"Pages",
              "relpersistence":"Persist",
              "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":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":33},"id":154,"panels":[],"title":"Index","type":"row"},
    {
      "datasource":{"type":"postgres","uid":"${dsn}"},
      "description":"Read = Returned Rows\n\nFetch = Scanned Rows",
      "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":"byName","options":"Table ID"}                   ,"properties":[{"id":"custom.width","value":90},{"id":"custom.filterable","value":true}]                                                                                                                                                                           },
          { "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":"Table"}                      ,"properties":[{"id":"links","value":[{"title":"Relation detail for ${__data.fields.Table}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Table}"}]},{"id":"custom.align","value":"left"},{"id":"custom.filterable","value":true}]         },
          { "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":300},{"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":300},{"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","value":0},{"color":"#3e668f","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}] }
        ]
      },
      "gridPos":{"h":11,"w":24,"x":0,"y":34},
      "id":184,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Scan"}]},
      "pluginVersion":"12.3.1",
      "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 schemaname = '$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":"Indexes",
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"indexrelname":true,"relname":true,"schemaname":true},
            "indexByName":{"Index":1,"Table":0,"def":2,"idx_scan":8,"idx_tup_fetch":10,"idx_tup_read":9,"indexrelid":6,"indexrelname":5,"relid":7,"relname":3,"schemaname":4},
            "renameByName":{"Index":"Index","Name":"Name","Table":"Table","def":"Define","idx_scan":"Scan","idx_tup_fetch":"Tup Fetch","idx_tup_read":"Tup Read","indexrelid":"Index ID","indexrelname":"","relid":"Table ID","relname":"","schemaname":""}
          }
        }
      ],
      "type":"table"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":45},"id":195,"panels":[],"title":"Bloat","type":"row"},
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Bloat ratio & wasted bytes estimation of all heap tables",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}},
        "overrides":[
          {"matcher":{"id":"byName","options":"Relation"},"properties":[{"id":"custom.align","value":"left"},{"id":"links","value":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}]}]},{"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":160}]},
          {"matcher":{"id":"byName","options":"Size"},"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"decbytes"}]},
          {
            "matcher":{"id":"byName","options":"Ratio"},
            "properties":[
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                              },
              { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                                                    },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#EAB839","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"rgb(0, 0, 0)","value":0.999}]} },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                    }
            ]
          },{
            "matcher":{"id":"byName","options":"Waste"},
            "properties":[
              { "id":"unit"              ,"value":"decbytes"                                                                                                                                                                                                                                                  },
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                               },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]} }
            ]
          },
          {"matcher":{"id":"byName","options":"TableID"},"properties":[{"id":"custom.width","value":100}]}
        ]
      },
      "gridPos":{"h":8,"w":12,"x":0,"y":46},
      "id":190,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat WHERE nspname = '$schema';",
          "refId":"A",
          "select":[[{"params":["probability"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "table":"auto_suspicious_matches",
          "timeColumn":"created_time",
          "timeColumnType":"timestamp",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Table Bloat",
      "transformations":[{"id":"organize","options":{"excludeByName":{"nspname":true},"includeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","tblid":"TableID","waste":"Waste"}}}],
      "type":"table"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Waste"},"properties":[{"id":"unit","value":"decbytes"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]}}] },
          { "matcher":{"id":"byName","options":"Ratio"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.999}]}}]                                     }
        ]
      },
      "gridPos":{"h":8,"w":12,"x":12,"y":46},
      "id":191,
      "options":{"colorByField":"ratio","colorField":"ratio","sizeField":"waste","textField":"relname","tiling":"treemapBinary"},
      "pluginVersion":"2.1.1",
      "targets":[{"datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},"editorMode":"code","format":"table","hide":false,"rawQuery":true,"rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat WHERE nspname = '$schema';","refId":"A","sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50}}],
      "title":"Table Wasted Bytes",
      "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","waste":"Waste"}}}],
      "type":"marcusolsson-treemap-panel"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "description":"Bloat ratio & wasted bytes estimation of all btree indexes",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          {"matcher":{"id":"byName","options":"Relation"},"properties":[{"id":"custom.align","value":"left"},{"id":"links","value":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}]}]},{"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"custom.width","value":160}]},
          {"matcher":{"id":"byName","options":"Size"},"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"decbytes"}]},
          {
            "matcher":{"id":"byName","options":"Ratio"},
            "properties":[
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                              },
              { "id":"unit"              ,"value":"percentunit"                                                                                                                                                                                                                                                    },
              { "id":"decimals"          ,"value":1                                                                                                                                                                                                                                                                },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#EAB839","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"rgb(0, 0, 0)","value":0.999}]} },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                                    }
            ]
          },{
            "matcher":{"id":"byName","options":"Waste"},
            "properties":[
              { "id":"unit"              ,"value":"decbytes"                                                                                                                                                                                                                                                  },
              { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                                         },
              { "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}                                                                                                                                                                                                               },
              { "id":"thresholds"        ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]} }
            ]
          },
          {"matcher":{"id":"byName","options":"IndexID"},"properties":[{"id":"custom.width","value":100}]},{"matcher":{"id":"byName","options":"TableID"},"properties":[{"id":"custom.width","value":100}]}
        ]
      },
      "gridPos":{"h":10,"w":12,"x":0,"y":54},
      "id":192,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
      "pluginVersion":"12.3.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat WHERE nspname = '$schema';",
          "refId":"A",
          "select":[[{"params":["probability"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "table":"auto_suspicious_matches",
          "timeColumn":"created_time",
          "timeColumnType":"timestamp",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Index Bloat",
      "transformations":[{"id":"organize","options":{"excludeByName":{"nspname":true},"includeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","idxid":"IndexID","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","tblid":"TableID","waste":"Waste"}}}],
      "type":"table"
    },
    {
      "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGCAT Table for ${__data.fields.Relation} on ${ins}.${datname}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Relation}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Waste"},"properties":[{"id":"unit","value":"decbytes"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":100000000},{"color":"#f79f64","value":1000000000},{"color":"#EAB839","value":2000000000},{"color":"red","value":4000000000},{"color":"#b783af","value":8000000000}]}}] },
          { "matcher":{"id":"byName","options":"Ratio"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.999}]}}]                                     }
        ]
      },
      "gridPos":{"h":10,"w":12,"x":12,"y":54},
      "id":193,
      "options":{"colorByField":"ratio","colorField":"ratio","sizeField":"waste","textField":"relname","tiling":"treemapBinary"},
      "pluginVersion":"2.1.1",
      "targets":[
        {
          "datasource":{"type":"postgres","uid":"${dsn}"},
          "editorMode":"code",
          "format":"table",
          "group":[],
          "metricColumn":"none",
          "rawQuery":true,
          "rawSql":"SELECT *, size * ratio AS waste FROM monitor.pg_table_bloat WHERE nspname = '$schema';",
          "refId":"A",
          "select":[[{"params":["probability"],"type":"column"}]],
          "sql":{"columns":[{"parameters":[],"type":"function"}],"groupBy":[{"property":{"type":"string"},"type":"groupBy"}],"limit":50},
          "table":"auto_suspicious_matches",
          "timeColumn":"created_time",
          "timeColumnType":"timestamp",
          "where":[{"name":"$__timeFilter","params":[],"type":"macro"}]
        }
      ],
      "title":"Index Wasted Bytes",
      "transformations":[{"id":"organize","options":{"excludeByName":{},"indexByName":{"bloat_size":4,"datname":0,"nspname":1,"ratio":5,"relname":2,"size":3},"renameByName":{"bloat_size":"Waste","datname":"Database","nspname":"Schema","ratio":"Ratio","relname":"Relation","size":"Size","waste":"Waste"}}}],
      "type":"marcusolsson-treemap-panel"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":64},
      "id":156,
      "panels":[
        {
          "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":"Table"},"properties":[{"id":"links","value":[{"title":"Relation detail for ${__data.fields.Table}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Table}"}]},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Sequence"},"properties":[{"id":"links","value":[{"title":"PGCAT Seqeuence : ${__data.fields.Sequence}","url":"/d/pgcat-table?var-dsn=${dsn:text}&var-relname=${__data.fields.Sequence}"}]},{"id":"custom.minWidth","value":360},{"id":"custom.align","value":"left"}]},
              {"matcher":{"id":"byName","options":"Last Value"},"properties":[{"id":"mappings","value":[{"options":{"match":"null+nan","result":{"color":"#80808080","index":0}},"type":"special"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"}]}}]},
              {"matcher":{"id":"byName","options":"Cycle"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"false":{"color":"#346f36cc","index":0,"text":"F"},"true":{"color":"#f79f64","index":1,"text":"T"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}]},
              {"matcher":{"id":"byType","options":"number"},"properties":[{"id":"custom.width","value":120}]},{"matcher":{"id":"byName","options":"Owner"},"properties":[{"id":"custom.width","value":120},{"id":"custom.filterable","value":true}]},
              {
                "matcher":{"id":"byName","options":"Type"},
                "properties":[{"id":"custom.width","value":110},{"id":"mappings","value":[{"options":{"bigint":{"color":"#346f36cc","index":2,"text":"BIGINT(8)"},"integer":{"color":"#5b9cd5","index":0,"text":"INTEGER(4)"},"smallint":{"color":"#3e668f","index":1,"text":"SMALLINT(2)"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.filterable","value":true}]
              },
              {"matcher":{"id":"byName","options":"Schema"},"properties":[{"id":"custom.minWidth","value":120},{"id":"links","value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]}]}
            ]
          },
          "gridPos":{"h":6,"w":24,"x":0,"y":101},
          "id":194,
          "options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":false,"displayName":"Sequence"}]},
          "pluginVersion":"11.6.0",
          "targets":[
            {
              "datasource":{"type":"postgres","uid":"${dsn}"},
              "editorMode":"code",
              "format":"table",
              "group":[],
              "metricColumn":"none",
              "rawQuery":true,
              "rawSql":"SELECT schemaname || '.' || sequencename AS \"Sequence\",  *\nFROM pg_sequences\nWHERE schemaname = '$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"}]
            }
          ],
          "transformations":[
            {
              "id":"organize",
              "options":{
                "excludeByName":{"indexrelname":true,"max_value":true,"min_value":true,"relname":true,"schemaname":true,"sequencename":true},
                "indexByName":{"Sequence":0,"cache_size":10,"cycle":9,"data_type":3,"increment_by":8,"last_value":4,"max_value":7,"min_value":6,"schemaname":1,"sequencename":11,"sequenceowner":2,"start_value":5},
                "renameByName":{
                  "Index":"Index",
                  "Name":"Name",
                  "Sequence":"Sequence",
                  "Table":"Table",
                  "cache_size":"Cache Size",
                  "cycle":"Cycle",
                  "data_type":"Type",
                  "def":"Define",
                  "idx_scan":"Scan",
                  "idx_tup_fetch":"Tup Fetch",
                  "idx_tup_read":"Tup Read",
                  "increment_by":"Increment By",
                  "indexrelid":"Index ID",
                  "indexrelname":"",
                  "last_value":"Last Value",
                  "max_value":"Max",
                  "min_value":"Min",
                  "relid":"Table ID",
                  "relname":"",
                  "schemaname":"Schema",
                  "sequenceowner":"Owner",
                  "start_value":"Start"
                }
              }
            }
          ],
          "type":"table"
        }
      ],
      "title":"Seq",
      "type":"row"
    },
    {
      "collapsed":true,
      "gridPos":{"h":1,"w":24,"x":0,"y":65},
      "id":203,
      "panels":[
        {
          "datasource":{"type":"grafana-postgresql-datasource","uid":"${dsn}"},
          "description":"Installed Exension in this Schema",
          "fieldConfig":{
            "defaults":{"color":{"fixedColor":"#3e668f","mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-text"},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"text"}]}},
            "overrides":[
              {
                "matcher":{"id":"byName","options":"Schema"},
                "properties":[
                  { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
                  { "id":"mappings"          ,"value":[{"options":{"monitor":{"color":"#cc4637d9","index":1},"public":{"color":"#3e668f","index":0},"repack":{"color":"#cc4637d9","index":2}},"type":"value"},{"options":{"pattern":"_.*","result":{"color":"#f79f64","index":3}},"type":"regex"}] },
                  { "id":"custom.cellOptions","value":{"type":"color-text"}                                                                                                                                                                                                                        },
                  { "id":"color"             ,"value":{"fixedColor":"#3e668f","mode":"fixed"}                                                                                                                                                                                                      },
                  { "id":"links"             ,"value":[]                                                                                                                                                                                                                                           },
                  { "id":"custom.minWidth"   ,"value":180                                                                                                                                                                                                                                          },
                  { "id":"links"             ,"value":[{"title":"PGCAT Schema : ${schema}","url":"/d/pgcat-schema?var-dsn=${dsn:text}&var-schema=${__data.fields.Schema}&${__url_time_range}"}]                                                                                                    },
                  { "id":"custom.filterable" ,"value":true                                                                                                                                                                                                                                         },
                  { "id":"custom.width"      ,"value":100                                                                                                                                                                                                                                          },
                  { "id":"custom.align"      ,"value":"left"                                                                                                                                                                                                                                       }
                ]
              },
              {"matcher":{"id":"byName","options":"Extension"},"properties":[{"id":"custom.align","value":"left"},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":150},{"id":"links","value":[{"targetBlank":true,"title":"Extension ${__data.fields.Extension}","url":"https://pgext.cloud/e/${__data.fields.Extension}"}]}]},
              {"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"Description"},"properties":[{"id":"custom.align","value":"left"}]}
            ]
          },
          "gridPos":{"h":8,"w":24,"x":0,"y":84},
          "id":204,
          "links":[{"targetBlank":true,"title":"PG Extension Catalog","url":"https://pgext.cloud/list"}],
          "options":{"cellHeight":"sm","footer":{"countRows":false,"enablePagination":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[]},
          "pluginVersion":"12.0.2",
          "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 e.extname , e.extversion, n.nspname, c.description\nFROM pg_catalog.pg_extension e LEFT JOIN pg_catalog.pg_namespace n\nON n.oid = e.extnamespace LEFT JOIN pg_catalog.pg_description c\nON c.objoid = e.oid AND c.classoid = 'pg_catalog.pg_extension'::pg_catalog.regclass\nWHERE n.nspname = '$schema'\nORDER 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":"Installed Extensions",
          "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":false,
                  "encoding":true,
                  "idx_tup_fetch":false,
                  "n_ins_since_vacuum":false,
                  "n_mod_since_analyze":false,
                  "n_tup_hot_upd":false,
                  "relam":true,
                  "relfilenode":false,
                  "relid":true,
                  "relname":true,
                  "relnamespace":true,
                  "reloftype":true,
                  "relpages":true,
                  "reltype":true,
                  "schemaname":true,
                  "seq_tup_read":false,
                  "tablespace":true,
                  "vacuum_count":false
                },
                "includeByName":{},
                "indexByName":{"description":3,"extname":0,"extversion":1,"nspname":2},
                "renameByName":{
                  "I":"Partitioned Index",
                  "Kind":"Kind",
                  "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",
                  "extname":"Extension",
                  "extversion":"Version",
                  "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",
                  "relage":"Age",
                  "relfilenode":"Filenode",
                  "relhasindex":"",
                  "relid":"",
                  "relkind":"Kind",
                  "relname":"",
                  "relnatts":"nAttr",
                  "relpages":"Pages",
                  "relpersistence":"Persist",
                  "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":"table"
        }
      ],
      "title":"Extension",
      "type":"row"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","PGSQL","PGCAT","Database"],
  "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":"${dsn}"},"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":{"type":"postgres","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":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT '${dsn:text}';"                                  ,"description":"Cluster"                    ,"hide":2,"includeAll":false,"label":"Cluster"    ,"name":"cls"    ,"options":[],"query":"SELECT '${dsn:text}';"                                  ,"refresh":2,"regex":"/(\\S+)-\\d+\\.\\S+/","sort":1,"type":"query"      },
      { "current":{},"datasource":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT nspname FROM pg_namespace;"                      ,"description":"Schema Name"                ,         "includeAll":false,"label":"Schema"     ,"name":"schema" ,"options":[],"query":"SELECT nspname FROM pg_namespace;"                      ,"refresh":1,"regex":""                    ,"sort":2,"type":"query"      },
      { "current":{},"datasource":{"type":"postgres","uid":"${dsn}"},"definition":"SELECT oid FROM pg_namespace WHERE nspname = '$schema';","description":"Schema OID"                 ,"hide":2,"includeAll":false,"label":"SchemaID"   ,"name":"nspid"  ,"options":[],"query":"SELECT oid FROM pg_namespace WHERE nspname = '$schema';","refresh":1,"regex":""                    ,"sort":2,"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 Schema",
  "uid":"pgcat-schema",
  "version":1,
  "weekStart":""
}