/*
This file is part of OmniDB.
OmniDB is open-source software, distributed "AS IS" under the MIT license in the hope that it will be useful.

The MIT License (MIT)

Portions Copyright (c) 2015-2020, The OmniDB Team
Portions Copyright (c) 2017-2020, 2ndQuadrant Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

var v_explain_sample = [
  {
    "Plan": {
      "Node Type": "Sort",
      "Parallel Aware": false,
      "Startup Cost": 282.01,
      "Total Cost": 282.02,
      "Plan Rows": 1,
      "Plan Width": 360,
      "Actual Startup Time": 10.708,
      "Actual Total Time": 10.710,
      "Actual Rows": 72,
      "Actual Loops": 1,
      "Sort Key": ["(CASE WHEN ((cc.relpages)::double precision < ceil(((cc.reltuples * (((((((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric + (foo.ma)::numeric) - CASE WHEN ((((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric % (foo.ma)::numeric) = '0'::numeric) THEN (foo.ma)::numeric ELSE (((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric % (foo.ma)::numeric) END))::double precision + (foo.maxfracsum * (((foo.nullhdr + foo.ma) - CASE WHEN ((foo.nullhdr % (foo.ma)::bigint) = 0) THEN (foo.ma)::bigint ELSE (foo.nullhdr % (foo.ma)::bigint) END))::double precision)) + '4'::double precision)) / ((foo.bs)::double precision - '20'::double precision)))) THEN '0'::numeric ELSE (foo.bs * ((((cc.relpages)::double precision - ceil(((cc.reltuples * (((((((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric + (foo.ma)::numeric) - CASE WHEN ((((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric % (foo.ma)::numeric) = '0'::numeric) THEN (foo.ma)::numeric ELSE (((foo.datawidth + (((foo.hdr + foo.ma) - CASE WHEN ((foo.hdr % foo.ma) = 0) THEN foo.ma ELSE (foo.hdr % foo.ma) END))::double precision))::numeric % (foo.ma)::numeric) END))::double precision + (foo.maxfracsum * (((foo.nullhdr + foo.ma) - CASE WHEN ((foo.nullhdr % (foo.ma)::bigint) = 0) THEN (foo.ma)::bigint ELSE (foo.nullhdr % (foo.ma)::bigint) END))::double precision)) + '4'::double precision)) / ((foo.bs)::double precision - '20'::double precision)))))::bigint)::numeric) END) DESC"],
      "Sort Method": "quicksort",
      "Sort Space Used": 62,
      "Sort Space Type": "Memory",
      "Shared Hit Blocks": 2963,
      "Shared Read Blocks": 28,
      "Shared Dirtied Blocks": 2,
      "Shared Written Blocks": 0,
      "Local Hit Blocks": 0,
      "Local Read Blocks": 0,
      "Local Dirtied Blocks": 0,
      "Local Written Blocks": 0,
      "Temp Read Blocks": 0,
      "Temp Written Blocks": 0,
      "Plans": [
        {
          "Node Type": "Nested Loop",
          "Parent Relationship": "Outer",
          "Parallel Aware": false,
          "Join Type": "Left",
          "Startup Cost": 261.39,
          "Total Cost": 282.00,
          "Plan Rows": 1,
          "Plan Width": 360,
          "Actual Startup Time": 9.594,
          "Actual Total Time": 10.657,
          "Actual Rows": 72,
          "Actual Loops": 1,
          "Inner Unique": true,
          "Shared Hit Blocks": 2960,
          "Shared Read Blocks": 28,
          "Shared Dirtied Blocks": 2,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Join Type": "Left",
              "Startup Cost": 261.12,
              "Total Cost": 280.56,
              "Plan Rows": 1,
              "Plan Width": 200,
              "Actual Startup Time": 9.554,
              "Actual Total Time": 9.714,
              "Actual Rows": 72,
              "Actual Loops": 1,
              "Inner Unique": false,
              "Shared Hit Blocks": 2747,
              "Shared Read Blocks": 28,
              "Shared Dirtied Blocks": 2,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Nested Loop",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Join Type": "Inner",
                  "Startup Cost": 260.97,
                  "Total Cost": 280.30,
                  "Plan Rows": 1,
                  "Plan Width": 200,
                  "Actual Startup Time": 9.550,
                  "Actual Total Time": 9.659,
                  "Actual Rows": 37,
                  "Actual Loops": 1,
                  "Inner Unique": true,
                  "Join Filter": "(foo.schemaname = nn.nspname)",
                  "Rows Removed by Join Filter": 0,
                  "Shared Hit Blocks": 2674,
                  "Shared Read Blocks": 28,
                  "Shared Dirtied Blocks": 2,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Hash Join",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Join Type": "Inner",
                      "Startup Cost": 260.84,
                      "Total Cost": 279.32,
                      "Plan Rows": 5,
                      "Plan Width": 204,
                      "Actual Startup Time": 9.547,
                      "Actual Total Time": 9.617,
                      "Actual Rows": 43,
                      "Actual Loops": 1,
                      "Inner Unique": false,
                      "Hash Cond": "(cc.relname = foo.tablename)",
                      "Shared Hit Blocks": 2588,
                      "Shared Read Blocks": 28,
                      "Shared Dirtied Blocks": 2,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Relation Name": "pg_class",
                          "Alias": "cc",
                          "Startup Cost": 0.00,
                          "Total Cost": 16.95,
                          "Plan Rows": 395,
                          "Plan Width": 80,
                          "Actual Startup Time": 0.002,
                          "Actual Total Time": 0.025,
                          "Actual Rows": 397,
                          "Actual Loops": 1,
                          "Shared Hit Blocks": 13,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        },
                        {
                          "Node Type": "Hash",
                          "Parent Relationship": "Inner",
                          "Parallel Aware": false,
                          "Startup Cost": 260.78,
                          "Total Cost": 260.78,
                          "Plan Rows": 5,
                          "Plan Width": 188,
                          "Actual Startup Time": 9.538,
                          "Actual Total Time": 9.538,
                          "Actual Rows": 43,
                          "Actual Loops": 1,
                          "Hash Buckets": 1024,
                          "Original Hash Buckets": 1024,
                          "Hash Batches": 1,
                          "Original Hash Batches": 1,
                          "Peak Memory Usage": 17,
                          "Shared Hit Blocks": 2575,
                          "Shared Read Blocks": 28,
                          "Shared Dirtied Blocks": 2,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Subquery Scan",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Alias": "foo",
                              "Startup Cost": 156.80,
                              "Total Cost": 260.78,
                              "Plan Rows": 5,
                              "Plan Width": 188,
                              "Actual Startup Time": 9.039,
                              "Actual Total Time": 9.522,
                              "Actual Rows": 43,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 2575,
                              "Shared Read Blocks": 28,
                              "Shared Dirtied Blocks": 2,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Aggregate",
                                  "Strategy": "Sorted",
                                  "Partial Mode": "Simple",
                                  "Parent Relationship": "Subquery",
                                  "Parallel Aware": false,
                                  "Startup Cost": 156.80,
                                  "Total Cost": 260.73,
                                  "Plan Rows": 5,
                                  "Plan Width": 188,
                                  "Actual Startup Time": 9.038,
                                  "Actual Total Time": 9.517,
                                  "Actual Rows": 43,
                                  "Actual Loops": 1,
                                  "Group Key": ["s.schemaname", "s.tablename", "(CASE WHEN (\"substring\"(version(), 12, 3) = ANY ('{8.0,8.1,8.2}'::text[])) THEN 27 ELSE 23 END)", "(CASE WHEN (version() ~ 'mingw32'::text) THEN 8 ELSE 4 END)", "($0)"],
                                  "Shared Hit Blocks": 2575,
                                  "Shared Read Blocks": 28,
                                  "Shared Dirtied Blocks": 2,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "Plans": [
                                    {
                                      "Node Type": "Result",
                                      "Parent Relationship": "InitPlan",
                                      "Subplan Name": "InitPlan 1 (returns $0)",
                                      "Parallel Aware": false,
                                      "Startup Cost": 0.00,
                                      "Total Cost": 0.02,
                                      "Plan Rows": 1,
                                      "Plan Width": 32,
                                      "Actual Startup Time": 0.005,
                                      "Actual Total Time": 0.005,
                                      "Actual Rows": 1,
                                      "Actual Loops": 1,
                                      "Shared Hit Blocks": 0,
                                      "Shared Read Blocks": 0,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0
                                    },
                                    {
                                      "Node Type": "Sort",
                                      "Parent Relationship": "Outer",
                                      "Parallel Aware": false,
                                      "Startup Cost": 156.78,
                                      "Total Cost": 156.79,
                                      "Plan Rows": 5,
                                      "Plan Width": 176,
                                      "Actual Startup Time": 9.003,
                                      "Actual Total Time": 9.019,
                                      "Actual Rows": 424,
                                      "Actual Loops": 1,
                                      "Sort Key": ["s.schemaname", "s.tablename"],
                                      "Sort Method": "quicksort",
                                      "Sort Space Used": 137,
                                      "Sort Space Type": "Memory",
                                      "Shared Hit Blocks": 2082,
                                      "Shared Read Blocks": 28,
                                      "Shared Dirtied Blocks": 2,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "Plans": [
                                        {
                                          "Node Type": "Subquery Scan",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Alias": "s",
                                          "Startup Cost": 128.38,
                                          "Total Cost": 156.72,
                                          "Plan Rows": 5,
                                          "Plan Width": 176,
                                          "Actual Startup Time": 7.756,
                                          "Actual Total Time": 8.853,
                                          "Actual Rows": 424,
                                          "Actual Loops": 1,
                                          "Shared Hit Blocks": 2079,
                                          "Shared Read Blocks": 28,
                                          "Shared Dirtied Blocks": 2,
                                          "Shared Written Blocks": 0,
                                          "Local Hit Blocks": 0,
                                          "Local Read Blocks": 0,
                                          "Local Dirtied Blocks": 0,
                                          "Local Written Blocks": 0,
                                          "Temp Read Blocks": 0,
                                          "Temp Written Blocks": 0,
                                          "Plans": [
                                            {
                                              "Node Type": "Nested Loop",
                                              "Parent Relationship": "Subquery",
                                              "Parallel Aware": false,
                                              "Join Type": "Left",
                                              "Startup Cost": 128.38,
                                              "Total Cost": 156.60,
                                              "Plan Rows": 5,
                                              "Plan Width": 401,
                                              "Actual Startup Time": 7.712,
                                              "Actual Total Time": 8.232,
                                              "Actual Rows": 424,
                                              "Actual Loops": 1,
                                              "Inner Unique": true,
                                              "Shared Hit Blocks": 2079,
                                              "Shared Read Blocks": 28,
                                              "Shared Dirtied Blocks": 2,
                                              "Shared Written Blocks": 0,
                                              "Local Hit Blocks": 0,
                                              "Local Read Blocks": 0,
                                              "Local Dirtied Blocks": 0,
                                              "Local Written Blocks": 0,
                                              "Temp Read Blocks": 0,
                                              "Temp Written Blocks": 0,
                                              "Plans": [
                                                {
                                                  "Node Type": "Hash Join",
                                                  "Parent Relationship": "Outer",
                                                  "Parallel Aware": false,
                                                  "Join Type": "Inner",
                                                  "Startup Cost": 128.24,
                                                  "Total Cost": 155.73,
                                                  "Plan Rows": 5,
                                                  "Plan Width": 76,
                                                  "Actual Startup Time": 7.705,
                                                  "Actual Total Time": 7.882,
                                                  "Actual Rows": 424,
                                                  "Actual Loops": 1,
                                                  "Inner Unique": false,
                                                  "Hash Cond": "((s_1.starelid = c.oid) AND (s_1.staattnum = a.attnum))",
                                                  "Shared Hit Blocks": 1231,
                                                  "Shared Read Blocks": 28,
                                                  "Shared Dirtied Blocks": 2,
                                                  "Shared Written Blocks": 0,
                                                  "Local Hit Blocks": 0,
                                                  "Local Read Blocks": 0,
                                                  "Local Dirtied Blocks": 0,
                                                  "Local Written Blocks": 0,
                                                  "Temp Read Blocks": 0,
                                                  "Temp Written Blocks": 0,
                                                  "Plans": [
                                                    {
                                                      "Node Type": "Seq Scan",
                                                      "Parent Relationship": "Outer",
                                                      "Parallel Aware": false,
                                                      "Relation Name": "pg_statistic",
                                                      "Alias": "s_1",
                                                      "Startup Cost": 0.00,
                                                      "Total Cost": 23.22,
                                                      "Plan Rows": 422,
                                                      "Plan Width": 14,
                                                      "Actual Startup Time": 0.001,
                                                      "Actual Total Time": 0.061,
                                                      "Actual Rows": 424,
                                                      "Actual Loops": 1,
                                                      "Shared Hit Blocks": 12,
                                                      "Shared Read Blocks": 7,
                                                      "Shared Dirtied Blocks": 1,
                                                      "Shared Written Blocks": 0,
                                                      "Local Hit Blocks": 0,
                                                      "Local Read Blocks": 0,
                                                      "Local Dirtied Blocks": 0,
                                                      "Local Written Blocks": 0,
                                                      "Temp Read Blocks": 0,
                                                      "Temp Written Blocks": 0
                                                    },
                                                    {
                                                      "Node Type": "Hash",
                                                      "Parent Relationship": "Inner",
                                                      "Parallel Aware": false,
                                                      "Startup Cost": 113.68,
                                                      "Total Cost": 113.68,
                                                      "Plan Rows": 971,
                                                      "Plan Width": 78,
                                                      "Actual Startup Time": 7.691,
                                                      "Actual Total Time": 7.691,
                                                      "Actual Rows": 2922,
                                                      "Actual Loops": 1,
                                                      "Hash Buckets": 4096,
                                                      "Original Hash Buckets": 1024,
                                                      "Hash Batches": 1,
                                                      "Original Hash Batches": 1,
                                                      "Peak Memory Usage": 346,
                                                      "Shared Hit Blocks": 1213,
                                                      "Shared Read Blocks": 21,
                                                      "Shared Dirtied Blocks": 1,
                                                      "Shared Written Blocks": 0,
                                                      "Local Hit Blocks": 0,
                                                      "Local Read Blocks": 0,
                                                      "Local Dirtied Blocks": 0,
                                                      "Local Written Blocks": 0,
                                                      "Temp Read Blocks": 0,
                                                      "Temp Written Blocks": 0,
                                                      "Plans": [
                                                        {
                                                          "Node Type": "Hash Join",
                                                          "Parent Relationship": "Outer",
                                                          "Parallel Aware": false,
                                                          "Join Type": "Inner",
                                                          "Startup Cost": 22.88,
                                                          "Total Cost": 113.68,
                                                          "Plan Rows": 971,
                                                          "Plan Width": 78,
                                                          "Actual Startup Time": 0.129,
                                                          "Actual Total Time": 7.214,
                                                          "Actual Rows": 2922,
                                                          "Actual Loops": 1,
                                                          "Inner Unique": true,
                                                          "Hash Cond": "(a.attrelid = c.oid)",
                                                          "Join Filter": "has_column_privilege(c.oid, a.attnum, 'select'::text)",
                                                          "Rows Removed by Join Filter": 0,
                                                          "Shared Hit Blocks": 1213,
                                                          "Shared Read Blocks": 21,
                                                          "Shared Dirtied Blocks": 1,
                                                          "Shared Written Blocks": 0,
                                                          "Local Hit Blocks": 0,
                                                          "Local Read Blocks": 0,
                                                          "Local Dirtied Blocks": 0,
                                                          "Local Written Blocks": 0,
                                                          "Temp Read Blocks": 0,
                                                          "Temp Written Blocks": 0,
                                                          "Plans": [
                                                            {
                                                              "Node Type": "Seq Scan",
                                                              "Parent Relationship": "Outer",
                                                              "Parallel Aware": false,
                                                              "Relation Name": "pg_attribute",
                                                              "Alias": "a",
                                                              "Startup Cost": 0.00,
                                                              "Total Cost": 83.13,
                                                              "Plan Rows": 2913,
                                                              "Plan Width": 6,
                                                              "Actual Startup Time": 0.002,
                                                              "Actual Total Time": 0.602,
                                                              "Actual Rows": 2922,
                                                              "Actual Loops": 1,
                                                              "Filter": "(NOT attisdropped)",
                                                              "Rows Removed by Filter": 0,
                                                              "Shared Hit Blocks": 33,
                                                              "Shared Read Blocks": 21,
                                                              "Shared Dirtied Blocks": 1,
                                                              "Shared Written Blocks": 0,
                                                              "Local Hit Blocks": 0,
                                                              "Local Read Blocks": 0,
                                                              "Local Dirtied Blocks": 0,
                                                              "Local Written Blocks": 0,
                                                              "Temp Read Blocks": 0,
                                                              "Temp Written Blocks": 0
                                                            },
                                                            {
                                                              "Node Type": "Hash",
                                                              "Parent Relationship": "Inner",
                                                              "Parallel Aware": false,
                                                              "Startup Cost": 17.94,
                                                              "Total Cost": 17.94,
                                                              "Plan Rows": 395,
                                                              "Plan Width": 72,
                                                              "Actual Startup Time": 0.117,
                                                              "Actual Total Time": 0.117,
                                                              "Actual Rows": 397,
                                                              "Actual Loops": 1,
                                                              "Hash Buckets": 1024,
                                                              "Original Hash Buckets": 1024,
                                                              "Hash Batches": 1,
                                                              "Original Hash Batches": 1,
                                                              "Peak Memory Usage": 49,
                                                              "Shared Hit Blocks": 13,
                                                              "Shared Read Blocks": 0,
                                                              "Shared Dirtied Blocks": 0,
                                                              "Shared Written Blocks": 0,
                                                              "Local Hit Blocks": 0,
                                                              "Local Read Blocks": 0,
                                                              "Local Dirtied Blocks": 0,
                                                              "Local Written Blocks": 0,
                                                              "Temp Read Blocks": 0,
                                                              "Temp Written Blocks": 0,
                                                              "Plans": [
                                                                {
                                                                  "Node Type": "Seq Scan",
                                                                  "Parent Relationship": "Outer",
                                                                  "Parallel Aware": false,
                                                                  "Relation Name": "pg_class",
                                                                  "Alias": "c",
                                                                  "Startup Cost": 0.00,
                                                                  "Total Cost": 17.94,
                                                                  "Plan Rows": 395,
                                                                  "Plan Width": 72,
                                                                  "Actual Startup Time": 0.001,
                                                                  "Actual Total Time": 0.068,
                                                                  "Actual Rows": 397,
                                                                  "Actual Loops": 1,
                                                                  "Filter": "((NOT relrowsecurity) OR (NOT row_security_active(oid)))",
                                                                  "Rows Removed by Filter": 0,
                                                                  "Shared Hit Blocks": 13,
                                                                  "Shared Read Blocks": 0,
                                                                  "Shared Dirtied Blocks": 0,
                                                                  "Shared Written Blocks": 0,
                                                                  "Local Hit Blocks": 0,
                                                                  "Local Read Blocks": 0,
                                                                  "Local Dirtied Blocks": 0,
                                                                  "Local Written Blocks": 0,
                                                                  "Temp Read Blocks": 0,
                                                                  "Temp Written Blocks": 0
                                                                }
                                                              ]
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "Node Type": "Index Scan",
                                                  "Parent Relationship": "Inner",
                                                  "Parallel Aware": false,
                                                  "Scan Direction": "Forward",
                                                  "Index Name": "pg_namespace_oid_index",
                                                  "Relation Name": "pg_namespace",
                                                  "Alias": "n",
                                                  "Startup Cost": 0.13,
                                                  "Total Cost": 0.18,
                                                  "Plan Rows": 1,
                                                  "Plan Width": 68,
                                                  "Actual Startup Time": 0.001,
                                                  "Actual Total Time": 0.001,
                                                  "Actual Rows": 1,
                                                  "Actual Loops": 424,
                                                  "Index Cond": "(oid = c.relnamespace)",
                                                  "Rows Removed by Index Recheck": 0,
                                                  "Shared Hit Blocks": 848,
                                                  "Shared Read Blocks": 0,
                                                  "Shared Dirtied Blocks": 0,
                                                  "Shared Written Blocks": 0,
                                                  "Local Hit Blocks": 0,
                                                  "Local Read Blocks": 0,
                                                  "Local Dirtied Blocks": 0,
                                                  "Local Written Blocks": 0,
                                                  "Temp Read Blocks": 0,
                                                  "Temp Written Blocks": 0
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    },
                                    {
                                      "Node Type": "Aggregate",
                                      "Strategy": "Plain",
                                      "Partial Mode": "Simple",
                                      "Parent Relationship": "SubPlan",
                                      "Subplan Name": "SubPlan 2",
                                      "Parallel Aware": false,
                                      "Startup Cost": 20.71,
                                      "Total Cost": 20.72,
                                      "Plan Rows": 1,
                                      "Plan Width": 8,
                                      "Actual Startup Time": 0.009,
                                      "Actual Total Time": 0.009,
                                      "Actual Rows": 1,
                                      "Actual Loops": 43,
                                      "Shared Hit Blocks": 493,
                                      "Shared Read Blocks": 0,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "Plans": [
                                        {
                                          "Node Type": "Nested Loop",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Join Type": "Inner",
                                          "Startup Cost": 4.84,
                                          "Total Cost": 20.70,
                                          "Plan Rows": 1,
                                          "Plan Width": 401,
                                          "Actual Startup Time": 0.006,
                                          "Actual Total Time": 0.008,
                                          "Actual Rows": 1,
                                          "Actual Loops": 43,
                                          "Inner Unique": true,
                                          "Join Filter": "(c_1.relnamespace = n_1.oid)",
                                          "Rows Removed by Join Filter": 0,
                                          "Shared Hit Blocks": 493,
                                          "Shared Read Blocks": 0,
                                          "Shared Dirtied Blocks": 0,
                                          "Shared Written Blocks": 0,
                                          "Local Hit Blocks": 0,
                                          "Local Read Blocks": 0,
                                          "Local Dirtied Blocks": 0,
                                          "Local Written Blocks": 0,
                                          "Temp Read Blocks": 0,
                                          "Temp Written Blocks": 0,
                                          "Plans": [
                                            {
                                              "Node Type": "Nested Loop",
                                              "Parent Relationship": "Outer",
                                              "Parallel Aware": false,
                                              "Join Type": "Inner",
                                              "Startup Cost": 4.84,
                                              "Total Cost": 19.61,
                                              "Plan Rows": 1,
                                              "Plan Width": 4,
                                              "Actual Startup Time": 0.006,
                                              "Actual Total Time": 0.007,
                                              "Actual Rows": 1,
                                              "Actual Loops": 43,
                                              "Inner Unique": true,
                                              "Join Filter": "(has_column_privilege(c_1.oid, a_1.attnum, 'select'::text) AND (c_1.oid = a_1.attrelid))",
                                              "Rows Removed by Join Filter": 0,
                                              "Shared Hit Blocks": 440,
                                              "Shared Read Blocks": 0,
                                              "Shared Dirtied Blocks": 0,
                                              "Shared Written Blocks": 0,
                                              "Local Hit Blocks": 0,
                                              "Local Read Blocks": 0,
                                              "Local Dirtied Blocks": 0,
                                              "Local Written Blocks": 0,
                                              "Temp Read Blocks": 0,
                                              "Temp Written Blocks": 0,
                                              "Plans": [
                                                {
                                                  "Node Type": "Nested Loop",
                                                  "Parent Relationship": "Outer",
                                                  "Parallel Aware": false,
                                                  "Join Type": "Inner",
                                                  "Startup Cost": 4.56,
                                                  "Total Cost": 18.68,
                                                  "Plan Rows": 1,
                                                  "Plan Width": 14,
                                                  "Actual Startup Time": 0.004,
                                                  "Actual Total Time": 0.005,
                                                  "Actual Rows": 1,
                                                  "Actual Loops": 43,
                                                  "Inner Unique": false,
                                                  "Shared Hit Blocks": 281,
                                                  "Shared Read Blocks": 0,
                                                  "Shared Dirtied Blocks": 0,
                                                  "Shared Written Blocks": 0,
                                                  "Local Hit Blocks": 0,
                                                  "Local Read Blocks": 0,
                                                  "Local Dirtied Blocks": 0,
                                                  "Local Written Blocks": 0,
                                                  "Temp Read Blocks": 0,
                                                  "Temp Written Blocks": 0,
                                                  "Plans": [
                                                    {
                                                      "Node Type": "Index Scan",
                                                      "Parent Relationship": "Outer",
                                                      "Parallel Aware": false,
                                                      "Scan Direction": "Forward",
                                                      "Index Name": "pg_class_relname_nsp_index",
                                                      "Relation Name": "pg_class",
                                                      "Alias": "c_1",
                                                      "Startup Cost": 0.27,
                                                      "Total Cost": 8.29,
                                                      "Plan Rows": 1,
                                                      "Plan Width": 8,
                                                      "Actual Startup Time": 0.001,
                                                      "Actual Total Time": 0.001,
                                                      "Actual Rows": 1,
                                                      "Actual Loops": 43,
                                                      "Index Cond": "(relname = s.tablename)",
                                                      "Rows Removed by Index Recheck": 0,
                                                      "Filter": "((NOT relrowsecurity) OR (NOT row_security_active(oid)))",
                                                      "Rows Removed by Filter": 0,
                                                      "Shared Hit Blocks": 129,
                                                      "Shared Read Blocks": 0,
                                                      "Shared Dirtied Blocks": 0,
                                                      "Shared Written Blocks": 0,
                                                      "Local Hit Blocks": 0,
                                                      "Local Read Blocks": 0,
                                                      "Local Dirtied Blocks": 0,
                                                      "Local Written Blocks": 0,
                                                      "Temp Read Blocks": 0,
                                                      "Temp Written Blocks": 0
                                                    },
                                                    {
                                                      "Node Type": "Bitmap Heap Scan",
                                                      "Parent Relationship": "Inner",
                                                      "Parallel Aware": false,
                                                      "Relation Name": "pg_statistic",
                                                      "Alias": "s_2",
                                                      "Startup Cost": 4.29,
                                                      "Total Cost": 10.37,
                                                      "Plan Rows": 2,
                                                      "Plan Width": 6,
                                                      "Actual Startup Time": 0.003,
                                                      "Actual Total Time": 0.003,
                                                      "Actual Rows": 1,
                                                      "Actual Loops": 43,
                                                      "Recheck Cond": "(starelid = c_1.oid)",
                                                      "Rows Removed by Index Recheck": 0,
                                                      "Filter": "(stanullfrac <> '0'::double precision)",
                                                      "Rows Removed by Filter": 9,
                                                      "Exact Heap Blocks": 66,
                                                      "Lossy Heap Blocks": 0,
                                                      "Shared Hit Blocks": 152,
                                                      "Shared Read Blocks": 0,
                                                      "Shared Dirtied Blocks": 0,
                                                      "Shared Written Blocks": 0,
                                                      "Local Hit Blocks": 0,
                                                      "Local Read Blocks": 0,
                                                      "Local Dirtied Blocks": 0,
                                                      "Local Written Blocks": 0,
                                                      "Temp Read Blocks": 0,
                                                      "Temp Written Blocks": 0,
                                                      "Plans": [
                                                        {
                                                          "Node Type": "Bitmap Index Scan",
                                                          "Parent Relationship": "Outer",
                                                          "Parallel Aware": false,
                                                          "Index Name": "pg_statistic_relid_att_inh_index",
                                                          "Startup Cost": 0.00,
                                                          "Total Cost": 4.29,
                                                          "Plan Rows": 2,
                                                          "Plan Width": 0,
                                                          "Actual Startup Time": 0.001,
                                                          "Actual Total Time": 0.001,
                                                          "Actual Rows": 10,
                                                          "Actual Loops": 43,
                                                          "Index Cond": "(starelid = c_1.oid)",
                                                          "Shared Hit Blocks": 86,
                                                          "Shared Read Blocks": 0,
                                                          "Shared Dirtied Blocks": 0,
                                                          "Shared Written Blocks": 0,
                                                          "Local Hit Blocks": 0,
                                                          "Local Read Blocks": 0,
                                                          "Local Dirtied Blocks": 0,
                                                          "Local Written Blocks": 0,
                                                          "Temp Read Blocks": 0,
                                                          "Temp Written Blocks": 0
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                },
                                                {
                                                  "Node Type": "Index Scan",
                                                  "Parent Relationship": "Inner",
                                                  "Parallel Aware": false,
                                                  "Scan Direction": "Forward",
                                                  "Index Name": "pg_attribute_relid_attnum_index",
                                                  "Relation Name": "pg_attribute",
                                                  "Alias": "a_1",
                                                  "Startup Cost": 0.28,
                                                  "Total Cost": 0.91,
                                                  "Plan Rows": 1,
                                                  "Plan Width": 6,
                                                  "Actual Startup Time": 0.001,
                                                  "Actual Total Time": 0.001,
                                                  "Actual Rows": 1,
                                                  "Actual Loops": 53,
                                                  "Index Cond": "((attrelid = s_2.starelid) AND (attnum = s_2.staattnum))",
                                                  "Rows Removed by Index Recheck": 0,
                                                  "Filter": "(NOT attisdropped)",
                                                  "Rows Removed by Filter": 0,
                                                  "Shared Hit Blocks": 159,
                                                  "Shared Read Blocks": 0,
                                                  "Shared Dirtied Blocks": 0,
                                                  "Shared Written Blocks": 0,
                                                  "Local Hit Blocks": 0,
                                                  "Local Read Blocks": 0,
                                                  "Local Dirtied Blocks": 0,
                                                  "Local Written Blocks": 0,
                                                  "Temp Read Blocks": 0,
                                                  "Temp Written Blocks": 0
                                                }
                                              ]
                                            },
                                            {
                                              "Node Type": "Seq Scan",
                                              "Parent Relationship": "Inner",
                                              "Parallel Aware": false,
                                              "Relation Name": "pg_namespace",
                                              "Alias": "n_1",
                                              "Startup Cost": 0.00,
                                              "Total Cost": 1.07,
                                              "Plan Rows": 1,
                                              "Plan Width": 4,
                                              "Actual Startup Time": 0.000,
                                              "Actual Total Time": 0.000,
                                              "Actual Rows": 1,
                                              "Actual Loops": 53,
                                              "Filter": "(nspname = s.schemaname)",
                                              "Rows Removed by Filter": 3,
                                              "Shared Hit Blocks": 53,
                                              "Shared Read Blocks": 0,
                                              "Shared Dirtied Blocks": 0,
                                              "Shared Written Blocks": 0,
                                              "Local Hit Blocks": 0,
                                              "Local Read Blocks": 0,
                                              "Local Dirtied Blocks": 0,
                                              "Local Written Blocks": 0,
                                              "Temp Read Blocks": 0,
                                              "Temp Written Blocks": 0
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "Node Type": "Index Scan",
                      "Parent Relationship": "Inner",
                      "Parallel Aware": false,
                      "Scan Direction": "Forward",
                      "Index Name": "pg_namespace_oid_index",
                      "Relation Name": "pg_namespace",
                      "Alias": "nn",
                      "Startup Cost": 0.13,
                      "Total Cost": 0.18,
                      "Plan Rows": 1,
                      "Plan Width": 68,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.001,
                      "Actual Rows": 1,
                      "Actual Loops": 43,
                      "Index Cond": "(oid = cc.relnamespace)",
                      "Rows Removed by Index Recheck": 0,
                      "Filter": "(nspname <> 'information_schema'::name)",
                      "Rows Removed by Filter": 0,
                      "Shared Hit Blocks": 86,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0
                    }
                  ]
                },
                {
                  "Node Type": "Index Scan",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Scan Direction": "Forward",
                  "Index Name": "pg_index_indrelid_index",
                  "Relation Name": "pg_index",
                  "Alias": "i",
                  "Startup Cost": 0.14,
                  "Total Cost": 0.24,
                  "Plan Rows": 2,
                  "Plan Width": 8,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.001,
                  "Actual Rows": 2,
                  "Actual Loops": 37,
                  "Index Cond": "(indrelid = cc.oid)",
                  "Rows Removed by Index Recheck": 0,
                  "Shared Hit Blocks": 73,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0
                }
              ]
            },
            {
              "Node Type": "Index Scan",
              "Parent Relationship": "Inner",
              "Parallel Aware": false,
              "Scan Direction": "Forward",
              "Index Name": "pg_class_oid_index",
              "Relation Name": "pg_class",
              "Alias": "c2",
              "Startup Cost": 0.27,
              "Total Cost": 0.72,
              "Plan Rows": 1,
              "Plan Width": 76,
              "Actual Startup Time": 0.001,
              "Actual Total Time": 0.001,
              "Actual Rows": 1,
              "Actual Loops": 72,
              "Index Cond": "(oid = i.indexrelid)",
              "Rows Removed by Index Recheck": 0,
              "Shared Hit Blocks": 213,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0
            }
          ]
        }
      ]
    },
    "Planning Time": 3.044,
    "Triggers": [
    ],
    "Execution Time": 12.011
  }
]
