{
  "Plan": {
    "Node Type": "Limit",
    "Parallel Aware": false,
    "Async Capable": false,
    "Startup Cost": 16544.18,
    "Total Cost": 16696.4,
    "Plan Rows": 14,
    "Plan Width": 266,
    "Actual Rows": 100.0,
    "Actual Loops": 1,
    "Disabled": false,
    "Shared Hit Blocks": 2403,
    "Shared Read Blocks": 4270,
    "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": 12027,
    "Temp Written Blocks": 7605,
    "Plans": [
      {
        "Node Type": "Unique",
        "Parent Relationship": "InitPlan",
        "Subplan Name": "CTE preferred",
        "Parallel Aware": false,
        "Async Capable": false,
        "Startup Cost": 11761.69,
        "Total Cost": 15323.62,
        "Plan Rows": 2873,
        "Plan Width": 1071,
        "Actual Rows": 28729.0,
        "Actual Loops": 1,
        "Disabled": false,
        "Shared Hit Blocks": 130,
        "Shared Read Blocks": 4224,
        "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": 3806,
        "Temp Written Blocks": 3813,
        "Plans": [
          {
            "Node Type": "Gather Merge",
            "Parent Relationship": "Outer",
            "Parallel Aware": false,
            "Async Capable": false,
            "Startup Cost": 11761.69,
            "Total Cost": 15108.12,
            "Plan Rows": 28733,
            "Plan Width": 1071,
            "Actual Rows": 28733.0,
            "Actual Loops": 1,
            "Disabled": false,
            "Workers Planned": 2,
            "Workers Launched": 2,
            "Shared Hit Blocks": 130,
            "Shared Read Blocks": 4224,
            "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": 3806,
            "Temp Written Blocks": 3813,
            "Plans": [
              {
                "Node Type": "Sort",
                "Parent Relationship": "Outer",
                "Parallel Aware": false,
                "Async Capable": false,
                "Startup Cost": 10761.67,
                "Total Cost": 10791.6,
                "Plan Rows": 11972,
                "Plan Width": 1071,
                "Actual Rows": 9577.67,
                "Actual Loops": 3,
                "Disabled": false,
                "Sort Key": [
                  "sec_financial_period.sec_company_id",
                  "sec_financial_period.fiscal_year",
                  "sec_financial_period.fiscal_quarter",
                  "sec_financial_period.filed_at DESC",
                  "sec_financial_period.revision DESC",
                  "sec_financial_period.accession_number DESC"
                ],
                "Sort Method": "external merge",
                "Sort Space Used": 12328,
                "Sort Space Type": "Disk",
                "Shared Hit Blocks": 130,
                "Shared Read Blocks": 4224,
                "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": 3806,
                "Temp Written Blocks": 3813,
                "Workers": [
                  {
                    "Worker Number": 0,
                    "Sort Method": "external merge",
                    "Sort Space Used": 8656,
                    "Sort Space Type": "Disk"
                  },
                  {
                    "Worker Number": 1,
                    "Sort Method": "external merge",
                    "Sort Space Used": 9464,
                    "Sort Space Type": "Disk"
                  }
                ],
                "Plans": [
                  {
                    "Node Type": "Seq Scan",
                    "Parent Relationship": "Outer",
                    "Parallel Aware": true,
                    "Async Capable": false,
                    "Relation Name": "sec_financial_period",
                    "Alias": "sec_financial_period",
                    "Startup Cost": 0.0,
                    "Total Cost": 4343.72,
                    "Plan Rows": 11972,
                    "Plan Width": 1071,
                    "Actual Rows": 9577.67,
                    "Actual Loops": 3,
                    "Disabled": false,
                    "Shared Hit Blocks": 0,
                    "Shared Read Blocks": 4224,
                    "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,
                    "Workers": []
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "Node Type": "Result",
        "Parent Relationship": "Outer",
        "Parallel Aware": false,
        "Async Capable": false,
        "Startup Cost": 1220.56,
        "Total Cost": 1372.78,
        "Plan Rows": 14,
        "Plan Width": 266,
        "Actual Rows": 100.0,
        "Actual Loops": 1,
        "Disabled": false,
        "Shared Hit Blocks": 2273,
        "Shared Read Blocks": 1744,
        "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": 9762,
        "Temp Written Blocks": 5336,
        "Plans": [
          {
            "Node Type": "Sort",
            "Parent Relationship": "Outer",
            "Parallel Aware": false,
            "Async Capable": false,
            "Startup Cost": 1220.56,
            "Total Cost": 1220.6,
            "Plan Rows": 14,
            "Plan Width": 262,
            "Actual Rows": 100.0,
            "Actual Loops": 1,
            "Disabled": false,
            "Sort Key": [
              "(CASE WHEN ((metrics.ttm_quarter_count = 4) AND ((((metrics.fiscal_year * 4) + metrics.fiscal_quarter) - metrics.ttm_start_index) = 3)) THEN metrics.ttm_revenue ELSE NULL::numeric END) DESC NULLS LAST",
              "c.ticker"
            ],
            "Sort Method": "top-N heapsort",
            "Sort Space Used": 69,
            "Sort Space Type": "Memory",
            "Shared Hit Blocks": 2097,
            "Shared Read Blocks": 1698,
            "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": 9762,
            "Temp Written Blocks": 5336,
            "Plans": [
              {
                "Node Type": "WindowAgg",
                "Parent Relationship": "Outer",
                "Parallel Aware": false,
                "Async Capable": false,
                "Startup Cost": 1149.47,
                "Total Cost": 1220.3,
                "Plan Rows": 14,
                "Plan Width": 262,
                "Actual Rows": 695.0,
                "Actual Loops": 1,
                "Disabled": false,
                "Window": "w1 AS ()",
                "Storage": "Memory",
                "Maximum Storage": 140,
                "Shared Hit Blocks": 2094,
                "Shared Read Blocks": 1698,
                "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": 9762,
                "Temp Written Blocks": 5336,
                "Plans": [
                  {
                    "Node Type": "Nested Loop",
                    "Parent Relationship": "Outer",
                    "Parallel Aware": false,
                    "Async Capable": false,
                    "Join Type": "Inner",
                    "Startup Cost": 231.49,
                    "Total Cost": 1219.91,
                    "Plan Rows": 14,
                    "Plan Width": 270,
                    "Actual Rows": 695.0,
                    "Actual Loops": 1,
                    "Disabled": false,
                    "Inner Unique": true,
                    "Shared Hit Blocks": 2094,
                    "Shared Read Blocks": 1698,
                    "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": 9762,
                    "Temp Written Blocks": 5336,
                    "Plans": [
                      {
                        "Node Type": "Subquery Scan",
                        "Parent Relationship": "Outer",
                        "Parallel Aware": false,
                        "Async Capable": false,
                        "Alias": "metrics",
                        "Startup Cost": 231.21,
                        "Total Cost": 1143.8,
                        "Plan Rows": 14,
                        "Plan Width": 224,
                        "Actual Rows": 698.0,
                        "Actual Loops": 1,
                        "Disabled": false,
                        "Filter": "(metrics.latest_rank = 1)",
                        "Rows Removed by Filter": 0,
                        "Shared Hit Blocks": 0,
                        "Shared Read Blocks": 1698,
                        "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": 9762,
                        "Temp Written Blocks": 5336,
                        "Plans": [
                          {
                            "Node Type": "WindowAgg",
                            "Parent Relationship": "Subquery",
                            "Parallel Aware": false,
                            "Async Capable": false,
                            "Startup Cost": 231.21,
                            "Total Cost": 1107.89,
                            "Plan Rows": 2873,
                            "Plan Width": 753,
                            "Actual Rows": 698.0,
                            "Actual Loops": 1,
                            "Disabled": false,
                            "Window": "w2 AS (PARTITION BY p.sec_company_id ORDER BY p.fiscal_year, p.fiscal_quarter ROWS BETWEEN '3'::bigint PRECEDING AND CURRENT ROW)",
                            "Filter": "((row_number() OVER w1) <= 1)",
                            "Rows Removed by Filter": 28031,
                            "Storage": "Memory",
                            "Maximum Storage": 17,
                            "Shared Hit Blocks": 0,
                            "Shared Read Blocks": 1698,
                            "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": 9762,
                            "Temp Written Blocks": 5336,
                            "Plans": [
                              {
                                "Node Type": "Incremental Sort",
                                "Parent Relationship": "Outer",
                                "Parallel Aware": false,
                                "Async Capable": false,
                                "Startup Cost": 230.93,
                                "Total Cost": 949.87,
                                "Plan Rows": 2873,
                                "Plan Width": 176,
                                "Actual Rows": 28729.0,
                                "Actual Loops": 1,
                                "Disabled": false,
                                "Sort Key": [
                                  "p.sec_company_id",
                                  "p.fiscal_year",
                                  "p.fiscal_quarter"
                                ],
                                "Presorted Key": [
                                  "p.sec_company_id"
                                ],
                                "Full-sort Groups": {
                                  "Group Count": 595,
                                  "Sort Methods Used": [
                                    "quicksort"
                                  ],
                                  "Sort Space Memory": {
                                    "Average Sort Space Used": 30,
                                    "Peak Sort Space Used": 30
                                  }
                                },
                                "Pre-sorted Groups": {
                                  "Group Count": 114,
                                  "Sort Methods Used": [
                                    "quicksort"
                                  ],
                                  "Sort Space Memory": {
                                    "Average Sort Space Used": 26,
                                    "Peak Sort Space Used": 26
                                  }
                                },
                                "Shared Hit Blocks": 0,
                                "Shared Read Blocks": 1698,
                                "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": 9762,
                                "Temp Written Blocks": 5336,
                                "Plans": [
                                  {
                                    "Node Type": "WindowAgg",
                                    "Parent Relationship": "Outer",
                                    "Parallel Aware": false,
                                    "Async Capable": false,
                                    "Startup Cost": 227.52,
                                    "Total Cost": 854.74,
                                    "Plan Rows": 2873,
                                    "Plan Width": 176,
                                    "Actual Rows": 28729.0,
                                    "Actual Loops": 1,
                                    "Disabled": false,
                                    "Window": "w1 AS (PARTITION BY p.sec_company_id ORDER BY p.fiscal_year, p.fiscal_quarter ROWS UNBOUNDED PRECEDING)",
                                    "Run Condition": "(row_number() OVER w1 <= 1)",
                                    "Storage": "Memory",
                                    "Maximum Storage": 21,
                                    "Shared Hit Blocks": 0,
                                    "Shared Read Blocks": 1698,
                                    "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": 9762,
                                    "Temp Written Blocks": 5336,
                                    "Plans": [
                                      {
                                        "Node Type": "Incremental Sort",
                                        "Parent Relationship": "Outer",
                                        "Parallel Aware": false,
                                        "Async Capable": false,
                                        "Startup Cost": 227.3,
                                        "Total Cost": 797.28,
                                        "Plan Rows": 2873,
                                        "Plan Width": 168,
                                        "Actual Rows": 28729.0,
                                        "Actual Loops": 1,
                                        "Disabled": false,
                                        "Sort Key": [
                                          "p.sec_company_id",
                                          "p.fiscal_year DESC",
                                          "p.fiscal_quarter DESC"
                                        ],
                                        "Presorted Key": [
                                          "p.sec_company_id"
                                        ],
                                        "Full-sort Groups": {
                                          "Group Count": 595,
                                          "Sort Methods Used": [
                                            "quicksort"
                                          ],
                                          "Sort Space Memory": {
                                            "Average Sort Space Used": 30,
                                            "Peak Sort Space Used": 30
                                          }
                                        },
                                        "Pre-sorted Groups": {
                                          "Group Count": 114,
                                          "Sort Methods Used": [
                                            "quicksort"
                                          ],
                                          "Sort Space Memory": {
                                            "Average Sort Space Used": 26,
                                            "Peak Sort Space Used": 26
                                          }
                                        },
                                        "Shared Hit Blocks": 0,
                                        "Shared Read Blocks": 1698,
                                        "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": 9762,
                                        "Temp Written Blocks": 5336,
                                        "Plans": [
                                          {
                                            "Node Type": "Merge Join",
                                            "Parent Relationship": "Outer",
                                            "Parallel Aware": false,
                                            "Async Capable": false,
                                            "Join Type": "Left",
                                            "Startup Cost": 224.64,
                                            "Total Cost": 702.14,
                                            "Plan Rows": 2873,
                                            "Plan Width": 168,
                                            "Actual Rows": 28729.0,
                                            "Actual Loops": 1,
                                            "Disabled": false,
                                            "Inner Unique": false,
                                            "Merge Cond": "((p.sec_company_id = yoy.sec_company_id) AND (((p.fiscal_year - 1)) = yoy.fiscal_year) AND (p.fiscal_quarter = yoy.fiscal_quarter))",
                                            "Shared Hit Blocks": 0,
                                            "Shared Read Blocks": 1698,
                                            "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": 9762,
                                            "Temp Written Blocks": 5336,
                                            "Plans": [
                                              {
                                                "Node Type": "Incremental Sort",
                                                "Parent Relationship": "Outer",
                                                "Parallel Aware": false,
                                                "Async Capable": false,
                                                "Startup Cost": 224.64,
                                                "Total Cost": 580.02,
                                                "Plan Rows": 2873,
                                                "Plan Width": 142,
                                                "Actual Rows": 28729.0,
                                                "Actual Loops": 1,
                                                "Disabled": false,
                                                "Sort Key": [
                                                  "p.sec_company_id",
                                                  "((p.fiscal_year - 1))",
                                                  "p.fiscal_quarter"
                                                ],
                                                "Presorted Key": [
                                                  "p.sec_company_id"
                                                ],
                                                "Full-sort Groups": {
                                                  "Group Count": 595,
                                                  "Sort Methods Used": [
                                                    "quicksort"
                                                  ],
                                                  "Sort Space Memory": {
                                                    "Average Sort Space Used": 30,
                                                    "Peak Sort Space Used": 30
                                                  }
                                                },
                                                "Pre-sorted Groups": {
                                                  "Group Count": 114,
                                                  "Sort Methods Used": [
                                                    "quicksort"
                                                  ],
                                                  "Sort Space Memory": {
                                                    "Average Sort Space Used": 26,
                                                    "Peak Sort Space Used": 26
                                                  }
                                                },
                                                "Shared Hit Blocks": 0,
                                                "Shared Read Blocks": 1698,
                                                "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": 5651,
                                                "Temp Written Blocks": 5336,
                                                "Plans": [
                                                  {
                                                    "Node Type": "Merge Join",
                                                    "Parent Relationship": "Outer",
                                                    "Parallel Aware": false,
                                                    "Async Capable": false,
                                                    "Join Type": "Left",
                                                    "Startup Cost": 223.05,
                                                    "Total Cost": 484.89,
                                                    "Plan Rows": 2873,
                                                    "Plan Width": 142,
                                                    "Actual Rows": 28729.0,
                                                    "Actual Loops": 1,
                                                    "Disabled": false,
                                                    "Inner Unique": false,
                                                    "Merge Cond": "((p.sec_company_id = prev.sec_company_id) AND (((((p.fiscal_year * 4) + p.fiscal_quarter) - 1)) = (((prev.fiscal_year * 4) + prev.fiscal_quarter))))",
                                                    "Shared Hit Blocks": 0,
                                                    "Shared Read Blocks": 1698,
                                                    "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": 5651,
                                                    "Temp Written Blocks": 5336,
                                                    "Plans": [
                                                      {
                                                        "Node Type": "Incremental Sort",
                                                        "Parent Relationship": "Outer",
                                                        "Parallel Aware": false,
                                                        "Async Capable": false,
                                                        "Startup Cost": 0.56,
                                                        "Total Cost": 152.6,
                                                        "Plan Rows": 2873,
                                                        "Plan Width": 116,
                                                        "Actual Rows": 28729.0,
                                                        "Actual Loops": 1,
                                                        "Disabled": false,
                                                        "Sort Key": [
                                                          "p.sec_company_id",
                                                          "((((p.fiscal_year * 4) + p.fiscal_quarter) - 1))"
                                                        ],
                                                        "Presorted Key": [
                                                          "p.sec_company_id"
                                                        ],
                                                        "Full-sort Groups": {
                                                          "Group Count": 595,
                                                          "Sort Methods Used": [
                                                            "quicksort"
                                                          ],
                                                          "Sort Space Memory": {
                                                            "Average Sort Space Used": 29,
                                                            "Peak Sort Space Used": 29
                                                          }
                                                        },
                                                        "Pre-sorted Groups": {
                                                          "Group Count": 114,
                                                          "Sort Methods Used": [
                                                            "quicksort"
                                                          ],
                                                          "Sort Space Memory": {
                                                            "Average Sort Space Used": 26,
                                                            "Peak Sort Space Used": 26
                                                          }
                                                        },
                                                        "Shared Hit Blocks": 0,
                                                        "Shared Read Blocks": 1698,
                                                        "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": 4564,
                                                        "Temp Written Blocks": 1545,
                                                        "Plans": [
                                                          {
                                                            "Node Type": "CTE Scan",
                                                            "Parent Relationship": "Outer",
                                                            "Parallel Aware": false,
                                                            "Async Capable": false,
                                                            "CTE Name": "preferred",
                                                            "Alias": "p",
                                                            "Startup Cost": 0.0,
                                                            "Total Cost": 57.46,
                                                            "Plan Rows": 2873,
                                                            "Plan Width": 116,
                                                            "Actual Rows": 28729.0,
                                                            "Actual Loops": 1,
                                                            "Disabled": false,
                                                            "Storage": "Disk",
                                                            "Maximum Storage": 30333,
                                                            "Shared Hit Blocks": 0,
                                                            "Shared Read Blocks": 1698,
                                                            "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": 4564,
                                                            "Temp Written Blocks": 1545
                                                          }
                                                        ]
                                                      },
                                                      {
                                                        "Node Type": "Sort",
                                                        "Parent Relationship": "Inner",
                                                        "Parallel Aware": false,
                                                        "Async Capable": false,
                                                        "Startup Cost": 222.49,
                                                        "Total Cost": 229.67,
                                                        "Plan Rows": 2873,
                                                        "Plan Width": 50,
                                                        "Actual Rows": 28729.0,
                                                        "Actual Loops": 1,
                                                        "Disabled": false,
                                                        "Sort Key": [
                                                          "prev.sec_company_id",
                                                          "(((prev.fiscal_year * 4) + prev.fiscal_quarter))"
                                                        ],
                                                        "Sort Method": "quicksort",
                                                        "Sort Space Used": 2322,
                                                        "Sort Space Type": "Memory",
                                                        "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": 1087,
                                                        "Temp Written Blocks": 3791,
                                                        "Plans": [
                                                          {
                                                            "Node Type": "CTE Scan",
                                                            "Parent Relationship": "Outer",
                                                            "Parallel Aware": false,
                                                            "Async Capable": false,
                                                            "CTE Name": "preferred",
                                                            "Alias": "prev",
                                                            "Startup Cost": 0.0,
                                                            "Total Cost": 57.46,
                                                            "Plan Rows": 2873,
                                                            "Plan Width": 50,
                                                            "Actual Rows": 28729.0,
                                                            "Actual Loops": 1,
                                                            "Disabled": false,
                                                            "Storage": "Disk",
                                                            "Maximum Storage": 30333,
                                                            "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": 1087,
                                                            "Temp Written Blocks": 3791
                                                          }
                                                        ]
                                                      }
                                                    ]
                                                  }
                                                ]
                                              },
                                              {
                                                "Node Type": "Materialize",
                                                "Parent Relationship": "Inner",
                                                "Parallel Aware": false,
                                                "Async Capable": false,
                                                "Startup Cost": 0.0,
                                                "Total Cost": 64.64,
                                                "Plan Rows": 2873,
                                                "Plan Width": 50,
                                                "Actual Rows": 28726.0,
                                                "Actual Loops": 1,
                                                "Disabled": false,
                                                "Storage": "Memory",
                                                "Maximum Storage": 20,
                                                "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": 4111,
                                                "Temp Written Blocks": 0,
                                                "Plans": [
                                                  {
                                                    "Node Type": "CTE Scan",
                                                    "Parent Relationship": "Outer",
                                                    "Parallel Aware": false,
                                                    "Async Capable": false,
                                                    "CTE Name": "preferred",
                                                    "Alias": "yoy",
                                                    "Startup Cost": 0.0,
                                                    "Total Cost": 57.46,
                                                    "Plan Rows": 2873,
                                                    "Plan Width": 50,
                                                    "Actual Rows": 28726.0,
                                                    "Actual Loops": 1,
                                                    "Disabled": false,
                                                    "Storage": "Disk",
                                                    "Maximum Storage": 30333,
                                                    "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": 4111,
                                                    "Temp Written Blocks": 0
                                                  }
                                                ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Node Type": "Index Scan",
                        "Parent Relationship": "Inner",
                        "Parallel Aware": false,
                        "Async Capable": false,
                        "Scan Direction": "Forward",
                        "Index Name": "sec_company_pkey",
                        "Relation Name": "sec_company",
                        "Alias": "c",
                        "Startup Cost": 0.28,
                        "Total Cost": 5.44,
                        "Plan Rows": 1,
                        "Plan Width": 62,
                        "Actual Rows": 1.0,
                        "Actual Loops": 698,
                        "Disabled": false,
                        "Index Cond": "(id = metrics.sec_company_id)",
                        "Rows Removed by Index Recheck": 0,
                        "Filter": "is_active",
                        "Rows Removed by Filter": 0,
                        "Index Searches": 698,
                        "Shared Hit Blocks": 2094,
                        "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,
            "Async Capable": false,
            "Startup Cost": 10.83,
            "Total Cost": 10.85,
            "Plan Rows": 1,
            "Plan Width": 4,
            "Actual Rows": 1.0,
            "Actual Loops": 100,
            "Disabled": false,
            "Shared Hit Blocks": 176,
            "Shared Read Blocks": 46,
            "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 Only Scan",
                "Parent Relationship": "Outer",
                "Parallel Aware": false,
                "Async Capable": false,
                "Scan Direction": "Forward",
                "Index Name": "sec_segment_fact_company_period_idx",
                "Relation Name": "sec_segment_fact",
                "Alias": "sf",
                "Startup Cost": 0.29,
                "Total Cost": 10.52,
                "Plan Rows": 127,
                "Plan Width": 0,
                "Actual Rows": 161.72,
                "Actual Loops": 100,
                "Disabled": false,
                "Index Cond": "(sec_company_id = c.id)",
                "Rows Removed by Index Recheck": 0,
                "Heap Fetches": 0,
                "Index Searches": 100,
                "Shared Hit Blocks": 176,
                "Shared Read Blocks": 46,
                "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
              }
            ]
          }
        ]
      }
    ]
  },
  "Settings": {},
  "Planning": {
    "Shared Hit Blocks": 525,
    "Shared Read Blocks": 37,
    "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": 6.862,
  "Triggers": [],
  "Execution Time": 431.635
}