Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't parse plan #651

Closed
BFJonk opened this issue Jun 25, 2024 · 5 comments
Closed

Couldn't parse plan #651

BFJonk opened this issue Jun 25, 2024 · 5 comments

Comments

@BFJonk
Copy link

BFJonk commented Jun 25, 2024

Note sure If I'm helping you with this. PEV & depesz can parse it:
links: https://explain.dalibo.com/plan/24e723549f472gff#plan, https://explain.depesz.com/s/8wY1#html , https://tatiyants.com/pev/#/plans/plan_1719309872935

plan:

[
  {
    "Plan": {
      "Node Type": "Group",
      "Parallel Aware": false,
      "Async Capable": false,
      "Startup Cost": 30040439.71,
      "Total Cost": 30816444.91,
      "Plan Rows": 6190510,
      "Plan Width": 167,
      "Actual Startup Time": 331898.191,
      "Actual Total Time": 334710.040,
      "Actual Rows": 3118383,
      "Actual Loops": 1,
      "Output": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "CASE WHEN (NOT \"*SELECT* 1\".voip) THEN 'call through'::text WHEN \"*SELECT* 1\".voip THEN 'voip call'::text ELSE NULL::text END", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".voip"],
      "Group Key": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".device", "\"*SELECT* 1\".context_device_manufacturer", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".voip", "\"*SELECT* 1\".brand"],
      "Shared Hit Blocks": 52801,
      "Shared Read Blocks": 9269170,
      "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": 765154,
      "Temp Written Blocks": 765370,
      "I/O Read Time": 92761.903,
      "I/O Write Time": 0.000,
      "Temp I/O Read Time": 8331.397,
      "Temp I/O Write Time": 6791.772,
      "Plans": [
        {
          "Node Type": "Gather Merge",
          "Parent Relationship": "Outer",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 30040439.71,
          "Total Cost": 30700372.86,
          "Plan Rows": 5158758,
          "Plan Width": 135,
          "Actual Startup Time": 331898.188,
          "Actual Total Time": 333536.233,
          "Actual Rows": 3118383,
          "Actual Loops": 1,
          "Output": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".voip"],
          "Workers Planned": 2,
          "Workers Launched": 2,
          "Shared Hit Blocks": 52801,
          "Shared Read Blocks": 9269170,
          "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": 765154,
          "Temp Written Blocks": 765370,
          "I/O Read Time": 92761.903,
          "I/O Write Time": 0.000,
          "Temp I/O Read Time": 8331.397,
          "Temp I/O Write Time": 6791.772,
          "Plans": [
            {
              "Node Type": "Group",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 30039439.68,
              "Total Cost": 30103924.16,
              "Plan Rows": 2579379,
              "Plan Width": 135,
              "Actual Startup Time": 331800.076,
              "Actual Total Time": 332315.539,
              "Actual Rows": 1039461,
              "Actual Loops": 3,
              "Output": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".voip"],
              "Group Key": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".device", "\"*SELECT* 1\".context_device_manufacturer", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".voip", "\"*SELECT* 1\".brand"],
              "Shared Hit Blocks": 52801,
              "Shared Read Blocks": 9269170,
              "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": 765154,
              "Temp Written Blocks": 765370,
              "I/O Read Time": 92761.903,
              "I/O Write Time": 0.000,
              "Temp I/O Read Time": 8331.397,
              "Temp I/O Write Time": 6791.772,
              "Workers": [
                {
                  "Worker Number": 0,
                  "Actual Startup Time": 331883.037,
                  "Actual Total Time": 332418.374,
                  "Actual Rows": 1084050,
                  "Actual Loops": 1,
                  "Shared Hit Blocks": 13897,
                  "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": 10043,
                  "Temp Written Blocks": 64,
                  "I/O Read Time": 0.000,
                  "I/O Write Time": 0.000,
                  "Temp I/O Read Time": 60.147,
                  "Temp I/O Write Time": 0.648
                },
                {
                  "Worker Number": 1,
                  "Actual Startup Time": 331820.297,
                  "Actual Total Time": 332338.891,
                  "Actual Rows": 1050229,
                  "Actual Loops": 1,
                  "Shared Hit Blocks": 21322,
                  "Shared Read Blocks": 4731152,
                  "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": 430539,
                  "Temp Written Blocks": 425063,
                  "I/O Read Time": 39082.120,
                  "I/O Write Time": 0.000,
                  "Temp I/O Read Time": 4907.769,
                  "Temp I/O Write Time": 3743.294
                }
              ],
              "Plans": [
                {
                  "Node Type": "Sort",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 30039439.68,
                  "Total Cost": 30045888.13,
                  "Plan Rows": 2579379,
                  "Plan Width": 135,
                  "Actual Startup Time": 331800.072,
                  "Actual Total Time": 331933.258,
                  "Actual Rows": 1060679,
                  "Actual Loops": 3,
                  "Output": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".voip"],
                  "Sort Key": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".device", "\"*SELECT* 1\".context_device_manufacturer", "(CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END)", "\"*SELECT* 1\".voip", "\"*SELECT* 1\".brand"],
                  "Sort Method": "quicksort",
                  "Sort Space Used": 132548,
                  "Sort Space Type": "Memory",
                  "Shared Hit Blocks": 52801,
                  "Shared Read Blocks": 9269170,
                  "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": 765154,
                  "Temp Written Blocks": 765370,
                  "I/O Read Time": 92761.903,
                  "I/O Write Time": 0.000,
                  "Temp I/O Read Time": 8331.397,
                  "Temp I/O Write Time": 6791.772,
                  "Workers": [
                    {
                      "Worker Number": 0,
                      "Actual Startup Time": 331883.033,
                      "Actual Total Time": 332024.164,
                      "Actual Rows": 1106263,
                      "Actual Loops": 1,
                      "Sort Method": "quicksort",
                      "Sort Space Used": 167826,
                      "Sort Space Type": "Memory",
                      "Shared Hit Blocks": 13897,
                      "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": 10043,
                      "Temp Written Blocks": 64,
                      "I/O Read Time": 0.000,
                      "I/O Write Time": 0.000,
                      "Temp I/O Read Time": 60.147,
                      "Temp I/O Write Time": 0.648
                    },
                    {
                      "Worker Number": 1,
                      "Actual Startup Time": 331820.293,
                      "Actual Total Time": 331955.749,
                      "Actual Rows": 1071399,
                      "Actual Loops": 1,
                      "Sort Method": "quicksort",
                      "Sort Space Used": 164459,
                      "Sort Space Type": "Memory",
                      "Shared Hit Blocks": 21322,
                      "Shared Read Blocks": 4731152,
                      "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": 430539,
                      "Temp Written Blocks": 425063,
                      "I/O Read Time": 39082.120,
                      "I/O Write Time": 0.000,
                      "Temp I/O Read Time": 4907.769,
                      "Temp I/O Write Time": 3743.294
                    }
                  ],
                  "Plans": [
                    {
                      "Node Type": "Hash Join",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": true,
                      "Async Capable": false,
                      "Join Type": "Left",
                      "Startup Cost": 26887237.81,
                      "Total Cost": 29764753.97,
                      "Plan Rows": 2579379,
                      "Plan Width": 135,
                      "Actual Startup Time": 328779.359,
                      "Actual Total Time": 329118.458,
                      "Actual Rows": 1060679,
                      "Actual Loops": 3,
                      "Output": ["dim_date_hist.date", "\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "CASE WHEN \"*SELECT* 1\".call_context_network_wifi THEN 'wifi'::text WHEN (NOT \"*SELECT* 1\".call_context_network_wifi) THEN 'cellular'::text ELSE NULL::text END", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".voip"],
                      "Inner Unique": false,
                      "Hash Cond": "(dim_date_hist.date = \"*SELECT* 1\".date)",
                      "Shared Hit Blocks": 52667,
                      "Shared Read Blocks": 9269170,
                      "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": 765154,
                      "Temp Written Blocks": 765370,
                      "I/O Read Time": 92761.903,
                      "I/O Write Time": 0.000,
                      "Temp I/O Read Time": 8331.397,
                      "Temp I/O Write Time": 6791.772,
                      "Workers": [
                        {
                          "Worker Number": 0,
                          "Actual Startup Time": 328722.531,
                          "Actual Total Time": 329097.162,
                          "Actual Rows": 1106263,
                          "Actual Loops": 1,
                          "Shared Hit Blocks": 13830,
                          "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": 10043,
                          "Temp Written Blocks": 64,
                          "I/O Read Time": 0.000,
                          "I/O Write Time": 0.000,
                          "Temp I/O Read Time": 60.147,
                          "Temp I/O Write Time": 0.648
                        },
                        {
                          "Worker Number": 1,
                          "Actual Startup Time": 328793.918,
                          "Actual Total Time": 329121.711,
                          "Actual Rows": 1071399,
                          "Actual Loops": 1,
                          "Shared Hit Blocks": 21255,
                          "Shared Read Blocks": 4731152,
                          "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": 430539,
                          "Temp Written Blocks": 425063,
                          "I/O Read Time": 39082.120,
                          "I/O Write Time": 0.000,
                          "Temp I/O Read Time": 4907.769,
                          "Temp I/O Write Time": 3743.294
                        }
                      ],
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": true,
                          "Async Capable": false,
                          "Relation Name": "dim_date_hist",
                          "Schema": "star",
                          "Alias": "dim_date_hist",
                          "Startup Cost": 0.00,
                          "Total Cost": 45652.32,
                          "Plan Rows": 312,
                          "Plan Width": 4,
                          "Actual Startup Time": 0.172,
                          "Actual Total Time": 29.030,
                          "Actual Rows": 244,
                          "Actual Loops": 3,
                          "Output": ["dim_date_hist.date"],
                          "Filter": "((dim_date_hist.date >= '2021-01-01'::date) AND (dim_date_hist.dss_current_flag = 'Y'::bpchar) AND (dim_date_hist.date <= CURRENT_DATE) AND (dim_date_hist.date >= (CURRENT_DATE - '2 years'::interval)))",
                          "Rows Removed by Filter": 7969,
                          "Shared Hit Blocks": 45370,
                          "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,
                          "I/O Read Time": 0.000,
                          "I/O Write Time": 0.000,
                          "Temp I/O Read Time": 0.000,
                          "Temp I/O Write Time": 0.000,
                          "Workers": [
                            {
                              "Worker Number": 0,
                              "Actual Startup Time": 0.339,
                              "Actual Total Time": 29.029,
                              "Actual Rows": 181,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 13821,
                              "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,
                              "I/O Read Time": 0.000,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000
                            },
                            {
                              "Worker Number": 1,
                              "Actual Startup Time": 0.055,
                              "Actual Total Time": 29.032,
                              "Actual Rows": 266,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 13999,
                              "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,
                              "I/O Read Time": 0.000,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000
                            }
                          ]
                        },
                        {
                          "Node Type": "Hash",
                          "Parent Relationship": "Inner",
                          "Parallel Aware": true,
                          "Async Capable": false,
                          "Startup Cost": 25434726.19,
                          "Total Cost": 25434726.19,
                          "Plan Rows": 51644850,
                          "Plan Width": 104,
                          "Actual Startup Time": 328686.242,
                          "Actual Total Time": 328686.247,
                          "Actual Rows": 1060679,
                          "Actual Loops": 3,
                          "Output": ["\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "\"*SELECT* 1\".call_context_network_wifi", "\"*SELECT* 1\".voip", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".date"],
                          "Hash Buckets": 8388608,
                          "Original Hash Buckets": 8388608,
                          "Hash Batches": 16,
                          "Original Hash Batches": 16,
                          "Peak Memory Usage": 87584,
                          "Shared Hit Blocks": 7279,
                          "Shared Read Blocks": 9269170,
                          "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": 734305,
                          "Temp Written Blocks": 765178,
                          "I/O Read Time": 92761.903,
                          "I/O Write Time": 0.000,
                          "Temp I/O Read Time": 8152.187,
                          "Temp I/O Write Time": 6789.769,
                          "Workers": [
                            {
                              "Worker Number": 0,
                              "Actual Startup Time": 328691.796,
                              "Actual Total Time": 328691.800,
                              "Actual Rows": 0,
                              "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,
                              "I/O Read Time": 0.000,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 0.000,
                              "Temp I/O Write Time": 0.000
                            },
                            {
                              "Worker Number": 1,
                              "Actual Startup Time": 328691.816,
                              "Actual Total Time": 328691.822,
                              "Actual Rows": 524443,
                              "Actual Loops": 1,
                              "Shared Hit Blocks": 7247,
                              "Shared Read Blocks": 4731152,
                              "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": 420007,
                              "Temp Written Blocks": 424999,
                              "I/O Read Time": 39082.120,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 4849.922,
                              "Temp I/O Write Time": 3742.619
                            }
                          ],
                          "Plans": [
                            {
                              "Node Type": "Append",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": true,
                              "Async Capable": false,
                              "Startup Cost": 14198948.57,
                              "Total Cost": 25434726.19,
                              "Plan Rows": 51644850,
                              "Plan Width": 104,
                              "Actual Startup Time": 194413.457,
                              "Actual Total Time": 216684.013,
                              "Actual Rows": 1060679,
                              "Actual Loops": 3,
                              "Shared Hit Blocks": 7279,
                              "Shared Read Blocks": 9269170,
                              "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": 734305,
                              "Temp Written Blocks": 734326,
                              "I/O Read Time": 92761.903,
                              "I/O Write Time": 0.000,
                              "Temp I/O Read Time": 8152.187,
                              "Temp I/O Write Time": 6406.206,
                              "Workers": [
                                {
                                  "Worker Number": 0,
                                  "Actual Startup Time": 0.001,
                                  "Actual Total Time": 0.004,
                                  "Actual Rows": 0,
                                  "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,
                                  "I/O Read Time": 0.000,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 0.000,
                                  "Temp I/O Write Time": 0.000
                                },
                                {
                                  "Worker Number": 1,
                                  "Actual Startup Time": 290462.104,
                                  "Actual Total Time": 328474.391,
                                  "Actual Rows": 524443,
                                  "Actual Loops": 1,
                                  "Shared Hit Blocks": 7247,
                                  "Shared Read Blocks": 4731152,
                                  "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": 420007,
                                  "Temp Written Blocks": 420019,
                                  "I/O Read Time": 39082.120,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 4849.922,
                                  "Temp I/O Write Time": 3681.486
                                }
                              ],
                              "Subplans Removed": 0,
                              "Plans": [
                                {
                                  "Node Type": "Subquery Scan",
                                  "Parent Relationship": "Member",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Alias": "*SELECT* 1",
                                  "Startup Cost": 21758885.23,
                                  "Total Cost": 25176501.94,
                                  "Plan Rows": 75947038,
                                  "Plan Width": 115,
                                  "Actual Startup Time": 290462.103,
                                  "Actual Total Time": 328417.066,
                                  "Actual Rows": 524443,
                                  "Actual Loops": 1,
                                  "Output": ["\"*SELECT* 1\".number_events", "\"*SELECT* 1\".os_name", "\"*SELECT* 1\".event", "\"*SELECT* 1\".context_device_manufacturer", "\"*SELECT* 1\".device", "\"*SELECT* 1\".call_context_network_wifi", "\"*SELECT* 1\".voip", "\"*SELECT* 1\".brand", "\"*SELECT* 1\".date"],
                                  "Shared Hit Blocks": 7247,
                                  "Shared Read Blocks": 4731152,
                                  "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": 420007,
                                  "Temp Written Blocks": 420019,
                                  "I/O Read Time": 39082.120,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 4849.922,
                                  "Temp I/O Write Time": 3681.486,
                                  "Workers": [
                                    {
                                      "Worker Number": 1,
                                      "Actual Startup Time": 290462.103,
                                      "Actual Total Time": 328417.066,
                                      "Actual Rows": 524443,
                                      "Actual Loops": 1,
                                      "Shared Hit Blocks": 7247,
                                      "Shared Read Blocks": 4731152,
                                      "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": 420007,
                                      "Temp Written Blocks": 420019,
                                      "I/O Read Time": 39082.120,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 4849.922,
                                      "Temp I/O Write Time": 3681.486
                                    }
                                  ],
                                  "Plans": [
                                    {
                                      "Node Type": "Aggregate",
                                      "Strategy": "Sorted",
                                      "Partial Mode": "Simple",
                                      "Parent Relationship": "Subquery",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 21758885.23,
                                      "Total Cost": 24417031.56,
                                      "Plan Rows": 75947038,
                                      "Plan Width": 115,
                                      "Actual Startup Time": 290462.102,
                                      "Actual Total Time": 328340.737,
                                      "Actual Rows": 524443,
                                      "Actual Loops": 1,
                                      "Output": ["((vialer_reborn_ios_ds_sgmt_tracks.received_at)::date)", "count(*)", "'ios'::text", "vialer_reborn_ios_ds_sgmt_tracks.event", "vialer_reborn_ios_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_ios_ds_sgmt_tracks.context_device_model", "vialer_reborn_ios_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_ios_ds_sgmt_tracks.voip", "vialer_reborn_ios_ds_sgmt_tracks.brand"],
                                      "Group Key": ["vialer_reborn_ios_ds_sgmt_tracks.event", "((vialer_reborn_ios_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_ios_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_ios_ds_sgmt_tracks.context_device_model", "vialer_reborn_ios_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_ios_ds_sgmt_tracks.voip", "vialer_reborn_ios_ds_sgmt_tracks.brand"],
                                      "Shared Hit Blocks": 7247,
                                      "Shared Read Blocks": 4731152,
                                      "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": 420007,
                                      "Temp Written Blocks": 420019,
                                      "I/O Read Time": 39082.120,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 4849.922,
                                      "Temp I/O Write Time": 3681.486,
                                      "Workers": [
                                        {
                                          "Worker Number": 1,
                                          "Actual Startup Time": 290462.102,
                                          "Actual Total Time": 328340.737,
                                          "Actual Rows": 524443,
                                          "Actual Loops": 1,
                                          "Shared Hit Blocks": 7247,
                                          "Shared Read Blocks": 4731152,
                                          "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": 420007,
                                          "Temp Written Blocks": 420019,
                                          "I/O Read Time": 39082.120,
                                          "I/O Write Time": 0.000,
                                          "Temp I/O Read Time": 4849.922,
                                          "Temp I/O Write Time": 3681.486
                                        }
                                      ],
                                      "Plans": [
                                        {
                                          "Node Type": "Sort",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Async Capable": false,
                                          "Startup Cost": 21758885.23,
                                          "Total Cost": 21948752.82,
                                          "Plan Rows": 75947038,
                                          "Plan Width": 75,
                                          "Actual Startup Time": 290462.087,
                                          "Actual Total Time": 310933.897,
                                          "Actual Rows": 75983442,
                                          "Actual Loops": 1,
                                          "Output": ["((vialer_reborn_ios_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_ios_ds_sgmt_tracks.event", "vialer_reborn_ios_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_ios_ds_sgmt_tracks.context_device_model", "vialer_reborn_ios_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_ios_ds_sgmt_tracks.voip", "vialer_reborn_ios_ds_sgmt_tracks.brand"],
                                          "Sort Key": ["vialer_reborn_ios_ds_sgmt_tracks.event", "((vialer_reborn_ios_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_ios_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_ios_ds_sgmt_tracks.context_device_model", "vialer_reborn_ios_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_ios_ds_sgmt_tracks.voip", "vialer_reborn_ios_ds_sgmt_tracks.brand"],
                                          "Shared Hit Blocks": 7247,
                                          "Shared Read Blocks": 4731152,
                                          "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": 420007,
                                          "Temp Written Blocks": 420019,
                                          "I/O Read Time": 39082.120,
                                          "I/O Write Time": 0.000,
                                          "Temp I/O Read Time": 4849.922,
                                          "Temp I/O Write Time": 3681.486,
                                          "Workers": [
                                            {
                                              "Worker Number": 1,
                                              "Actual Startup Time": 290462.087,
                                              "Actual Total Time": 310933.897,
                                              "Actual Rows": 75983442,
                                              "Actual Loops": 1,
                                              "Sort Method": "external merge",
                                              "Sort Space Used": 3360056,
                                              "Sort Space Type": "Disk",
                                              "Shared Hit Blocks": 7247,
                                              "Shared Read Blocks": 4731152,
                                              "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": 420007,
                                              "Temp Written Blocks": 420019,
                                              "I/O Read Time": 39082.120,
                                              "I/O Write Time": 0.000,
                                              "Temp I/O Read Time": 4849.922,
                                              "Temp I/O Write Time": 3681.486
                                            }
                                          ],
                                          "Plans": [
                                            {
                                              "Node Type": "Seq Scan",
                                              "Parent Relationship": "Outer",
                                              "Parallel Aware": false,
                                              "Async Capable": false,
                                              "Relation Name": "vialer_reborn_ios_ds_sgmt_tracks",
                                              "Schema": "datastore",
                                              "Alias": "vialer_reborn_ios_ds_sgmt_tracks",
                                              "Startup Cost": 0.00,
                                              "Total Cost": 6515045.21,
                                              "Plan Rows": 75947038,
                                              "Plan Width": 75,
                                              "Actual Startup Time": 5273.007,
                                              "Actual Total Time": 97792.163,
                                              "Actual Rows": 75983442,
                                              "Actual Loops": 1,
                                              "Output": ["(vialer_reborn_ios_ds_sgmt_tracks.received_at)::date", "vialer_reborn_ios_ds_sgmt_tracks.event", "vialer_reborn_ios_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_ios_ds_sgmt_tracks.context_device_model", "vialer_reborn_ios_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_ios_ds_sgmt_tracks.voip", "vialer_reborn_ios_ds_sgmt_tracks.brand"],
                                              "Filter": "(((vialer_reborn_ios_ds_sgmt_tracks.dss_current_flag)::text = 'Y'::text) AND (vialer_reborn_ios_ds_sgmt_tracks.received_at >= (CURRENT_DATE - '2 years'::interval)))",
                                              "Rows Removed by Filter": 3310812,
                                              "Shared Hit Blocks": 7247,
                                              "Shared Read Blocks": 4731152,
                                              "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,
                                              "I/O Read Time": 39082.120,
                                              "I/O Write Time": 0.000,
                                              "Temp I/O Read Time": 0.000,
                                              "Temp I/O Write Time": 0.000,
                                              "Workers": [
                                                {
                                                  "Worker Number": 1,
                                                  "Actual Startup Time": 5273.007,
                                                  "Actual Total Time": 97792.163,
                                                  "Actual Rows": 75983442,
                                                  "Actual Loops": 1,
                                                  "Shared Hit Blocks": 7247,
                                                  "Shared Read Blocks": 4731152,
                                                  "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,
                                                  "I/O Read Time": 39082.120,
                                                  "I/O Write Time": 0.000,
                                                  "Temp I/O Read Time": 0.000,
                                                  "Temp I/O Write Time": 0.000
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "Node Type": "Subquery Scan",
                                  "Parent Relationship": "Member",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Alias": "*SELECT* 2",
                                  "Startup Cost": 14198948.57,
                                  "Total Cost": 16478977.21,
                                  "Plan Rows": 48000603,
                                  "Plan Width": 87,
                                  "Actual Startup Time": 292778.264,
                                  "Actual Total Time": 321290.532,
                                  "Actual Rows": 2657594,
                                  "Actual Loops": 1,
                                  "Output": ["\"*SELECT* 2\".number_events", "\"*SELECT* 2\".os_name", "\"*SELECT* 2\".event", "\"*SELECT* 2\".context_device_manufacturer", "\"*SELECT* 2\".device", "\"*SELECT* 2\".call_context_network_wifi", "\"*SELECT* 2\".voip", "\"*SELECT* 2\".brand", "\"*SELECT* 2\".date"],
                                  "Shared Hit Blocks": 32,
                                  "Shared Read Blocks": 4538018,
                                  "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": 314298,
                                  "Temp Written Blocks": 314307,
                                  "I/O Read Time": 53679.783,
                                  "I/O Write Time": 0.000,
                                  "Temp I/O Read Time": 3302.265,
                                  "Temp I/O Write Time": 2724.720,
                                  "Workers": [
                                  ],
                                  "Plans": [
                                    {
                                      "Node Type": "Aggregate",
                                      "Strategy": "Sorted",
                                      "Partial Mode": "Simple",
                                      "Parent Relationship": "Subquery",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 14198948.57,
                                      "Total Cost": 15998971.18,
                                      "Plan Rows": 48000603,
                                      "Plan Width": 88,
                                      "Actual Startup Time": 292778.262,
                                      "Actual Total Time": 320926.218,
                                      "Actual Rows": 2657594,
                                      "Actual Loops": 1,
                                      "Output": ["((vialer_reborn_android_ds_sgmt_tracks.received_at)::date)", "count(*)", "'android'::text", "vialer_reborn_android_ds_sgmt_tracks.event", "vialer_reborn_android_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_android_ds_sgmt_tracks.context_device_name", "vialer_reborn_android_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.voip", "vialer_reborn_android_ds_sgmt_tracks.brand", "vialer_reborn_android_ds_sgmt_tracks.context_network_wifi"],
                                      "Group Key": ["vialer_reborn_android_ds_sgmt_tracks.event", "((vialer_reborn_android_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_android_ds_sgmt_tracks.context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.context_device_name", "vialer_reborn_android_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_android_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.voip", "vialer_reborn_android_ds_sgmt_tracks.brand"],
                                      "Shared Hit Blocks": 32,
                                      "Shared Read Blocks": 4538018,
                                      "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": 314298,
                                      "Temp Written Blocks": 314307,
                                      "I/O Read Time": 53679.783,
                                      "I/O Write Time": 0.000,
                                      "Temp I/O Read Time": 3302.265,
                                      "Temp I/O Write Time": 2724.720,
                                      "Workers": [
                                      ],
                                      "Plans": [
                                        {
                                          "Node Type": "Sort",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Async Capable": false,
                                          "Startup Cost": 14198948.57,
                                          "Total Cost": 14318950.07,
                                          "Plan Rows": 48000603,
                                          "Plan Width": 48,
                                          "Actual Startup Time": 292778.212,
                                          "Actual Total Time": 307173.140,
                                          "Actual Rows": 48394273,
                                          "Actual Loops": 1,
                                          "Output": ["((vialer_reborn_android_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_android_ds_sgmt_tracks.event", "vialer_reborn_android_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_android_ds_sgmt_tracks.context_device_name", "vialer_reborn_android_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.voip", "vialer_reborn_android_ds_sgmt_tracks.brand", "vialer_reborn_android_ds_sgmt_tracks.context_network_wifi"],
                                          "Sort Key": ["vialer_reborn_android_ds_sgmt_tracks.event", "((vialer_reborn_android_ds_sgmt_tracks.received_at)::date)", "vialer_reborn_android_ds_sgmt_tracks.context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.context_device_name", "vialer_reborn_android_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_android_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.voip", "vialer_reborn_android_ds_sgmt_tracks.brand"],
                                          "Sort Method": "external merge",
                                          "Sort Space Used": 2514384,
                                          "Sort Space Type": "Disk",
                                          "Shared Hit Blocks": 32,
                                          "Shared Read Blocks": 4538018,
                                          "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": 314298,
                                          "Temp Written Blocks": 314307,
                                          "I/O Read Time": 53679.783,
                                          "I/O Write Time": 0.000,
                                          "Temp I/O Read Time": 3302.265,
                                          "Temp I/O Write Time": 2724.720,
                                          "Workers": [
                                          ],
                                          "Plans": [
                                            {
                                              "Node Type": "Seq Scan",
                                              "Parent Relationship": "Outer",
                                              "Parallel Aware": false,
                                              "Async Capable": false,
                                              "Relation Name": "vialer_reborn_android_ds_sgmt_tracks",
                                              "Schema": "datastore",
                                              "Alias": "vialer_reborn_android_ds_sgmt_tracks",
                                              "Startup Cost": 0.00,
                                              "Total Cost": 5754554.33,
                                              "Plan Rows": 48000603,
                                              "Plan Width": 48,
                                              "Actual Startup Time": 11.737,
                                              "Actual Total Time": 98824.876,
                                              "Actual Rows": 48394273,
                                              "Actual Loops": 1,
                                              "Output": ["(vialer_reborn_android_ds_sgmt_tracks.received_at)::date", "vialer_reborn_android_ds_sgmt_tracks.event", "vialer_reborn_android_ds_sgmt_tracks.context_device_manufacturer", "vialer_reborn_android_ds_sgmt_tracks.context_device_name", "vialer_reborn_android_ds_sgmt_tracks.call_context_network_wifi", "vialer_reborn_android_ds_sgmt_tracks.voip", "vialer_reborn_android_ds_sgmt_tracks.brand", "vialer_reborn_android_ds_sgmt_tracks.context_network_wifi"],
                                              "Filter": "(((vialer_reborn_android_ds_sgmt_tracks.dss_current_flag)::text = 'Y'::text) AND (vialer_reborn_android_ds_sgmt_tracks.received_at >= (CURRENT_DATE - '2 years'::interval)))",
                                              "Rows Removed by Filter": 6428518,
                                              "Shared Hit Blocks": 32,
                                              "Shared Read Blocks": 4538018,
                                              "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,
                                              "I/O Read Time": 53679.783,
                                              "I/O Write Time": 0.000,
                                              "Temp I/O Read Time": 0.000,
                                              "Temp I/O Write Time": 0.000,
                                              "Workers": [
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    "Query Identifier": 8755812794153707221,
    "Planning": {
      "Shared Hit Blocks": 4,
      "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,
      "I/O Read Time": 0.000,
      "I/O Write Time": 0.000,
      "Temp I/O Read Time": 0.000,
      "Temp I/O Write Time": 0.000
    },
    "Planning Time": 0.727,
    "Triggers": [
    ],
    "Execution Time": 335254.255
  }
]

query:

/* 240619 Bart Jonk -- limited thet dataset to 2 years -- version 07 */

-- Vialer Mobile - Reborn --
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT TEXT)
With events as (
    -- ios --
    select
        received_at :: date as date,
        count (*) as number_events,
        'ios' as os_name,
        event,
        context_device_manufacturer,
        context_device_model as device,
        call_context_network_wifi,
        voip,
        brand
    from
        analysis.v_ds_vialer_reborn_ios_ds_sgmt_tracks_cur_v as vri
   where 
   		received_at >= current_date - interval '2 years'
    group by
        event,
        date,
        call_context_network_wifi,
        device,
        context_device_manufacturer,
        voip,
        brand
    union all
        -- android --
    select
        received_at :: date as date,
        count (*) as number_events,
        'android' as os_name,
        event,
        context_device_manufacturer,
        context_device_name as device,
        call_context_network_wifi,
        voip,
        brand
    from
        analysis.v_ds_vialer_reborn_android_ds_sgmt_tracks_cur_v as vra
   where 
   		received_at >= current_date - interval '2 years'
    group by
        event,
        date,
        context_network_wifi,
        device,
        context_device_manufacturer,
        call_context_network_wifi,
        voip,
        brand
)
SELECT
    dd.date,
    events.number_events,
    events.os_name,
    events.event,
    events.context_device_manufacturer as device,
    events.device as device_model,
    case
        when call_context_network_wifi = true THEN 'wifi'
        when call_context_network_wifi = false THEN 'cellular'
        else null
    end as connection_type,
    case
        when voip = false then 'call through'
        when voip = true then 'voip call'
        else null
    end as voip,
    brand
FROM
    star.dim_date as dd
    left join events on events.date = dd.date
where
    dd.date <= CURRENT_DATE
    and dd.date >= current_date - interval '2 years'
    and dd.date >= '2021-01-01'
group by
    dd.date,
    events.number_events,
    events.os_name,
    events.event,
    events.device,
    events.context_device_manufacturer,
    connection_type,
    voip,
    brand;
@pgiraud
Copy link
Member

pgiraud commented Jun 25, 2024

Thanks for the report. The links to depesz or pev are indeed useful. I'll have a look as soon as possible.

@pgiraud
Copy link
Member

pgiraud commented Jun 25, 2024

I did copy paste your plan onto explain.dalibo.com and it works for me: https://explain.dalibo.com/plan/84h559b040b4ebd1

The link you provided does not work indeed. It looks like you pasted the query in place of the plan and vice-versa. You probably faced the issue #472 .

@BFJonk
Copy link
Author

BFJonk commented Jun 25, 2024

I did...... and not once either, I think I did it 5 times in a row...... 🙈 trying swapping to JSON would help and other things

@pgiraud
Copy link
Member

pgiraud commented Jun 25, 2024

I'm not sure I understand very well. What do you mean by "swapping to JSON would help"?

@BFJonk
Copy link
Author

BFJonk commented Jun 27, 2024

oh, sorry to be unclear.... I meant, I tried to circumvent the 'error', by not using EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT TEXT), but EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON);

..... and then. pasted the result AGAIN in the wrong window. I also tried to reproduce the 'error' in a correct way, before logging this ticket.

In the end I managed to paste the explain plan & the query in the wrong place for at least 5 times in a row 🙈

@pgiraud pgiraud closed this as completed Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants