pg_graphql icon indicating copy to clipboard operation
pg_graphql copied to clipboard

First resolution of large query is slow

Open Flambe opened this issue 3 years ago • 14 comments

Describe the bug We have some queries that request a lot of nested data through various relationships and pivot tables. When running these large queries in our app (aka going via other pages which run different queries) they can often take a few seconds to return data, but if we hit one repeatedly (e.g. in a load test) the 99%ile response time is below 100ms (often reaching 30ms, a 100xish improvement). Yet if we go back to browsing through different pages again, the large queries each take a few seconds to complete.

To Reproduce I currently haven't got an easily sharable test case as it's in a DB with customer data, but I can share some of the GQL queries as examples of what we're running. (These queries are dynamically generated and can definitely be optimised better, but in the load tests below they've proven that they're still able to give speedy results)

Query 1
query loadSingleWareneingangsbuchData($id: BigInt) {
rows: custWareneingangsbuchCollection(filter: {id: {eq: $id}}) {
  edges {
    node {
      id
      zeugnis_vorhanden: zeugnisVorhanden
      waz_bemerkung: wazBemerkung
      waz_art_id: wazArt {
        id
        label
        __typename
      }
      waz_nr: wazNr
      schmelznr
      chemistry_validator: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              werkstoff_spezifikation: werkstoffSpezifikation {
                id
                werkstoff_spezifikation_element: custWerkstoffSpezifikationElementCollection {
                  edges {
                    node {
                      id
                      min
                      max
                      elemente {
                        id
                        name
                        symbol
                        __typename
                      }
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      chemistry_validator_values: custWareneingangsbuchElementeCollection {
        edges {
          node {
            value
            elementeId
            __typename
          }
          __typename
        }
        __typename
      }
      werkstoffzustaende_pivot: custWareneingangsbuchWerkstoffzustaendeCollection(
        orderBy: [{zustandId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: zustand {
              id
              werkstoffSpezifikation {
                werkstoff {
                  label
                  __typename
                }
                spezifikation {
                  label
                  __typename
                }
                __typename
              }
              zustaende {
                label
                __typename
              }
              werkstoff {
                synonyms
                __typename
              }
              status {
                name
                colour
                icon
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_values: custWareneingangsbuchMeCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      gepr_gg_spec_id: geprGgSpec {
        id
        label
        __typename
      }
      werkstoffprufunge_pivot: custWareneingangsbuchWerkstoffprufungeCollection(
        orderBy: [{werkstoffprufungeId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: werkstoffprufunge {
              id
              label
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      freigegaben
      __typename
    }
    __typename
  }
  __typename
}
}
Query 2
query loadSingleWareneingangsbuchData($id: BigInt) {
rows: custWareneingangsbuchCollection(filter: {id: {eq: $id}}) {
  edges {
    node {
      id
      referenztest
      wareneingangspruefung
      wareneingangsauftrag
      chemistry_validator_prufung: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              werkstoff_spezifikation: werkstoffSpezifikation {
                id
                werkstoff_spezifikation_element: custWerkstoffSpezifikationElementCollection {
                  edges {
                    node {
                      id
                      min
                      max
                      elemente {
                        id
                        name
                        symbol
                        __typename
                      }
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      chemistry_validator_prufung_values: custWareneingangsbuchElementePrufungCollection {
        edges {
          node {
            value
            elementeId
            __typename
          }
          __typename
        }
        __typename
      }
      werkstoffzustaende_pivot: custWareneingangsbuchWerkstoffzustaendeCollection(
        orderBy: [{zustandId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: zustand {
              id
              werkstoffSpezifikation {
                werkstoff {
                  label
                  __typename
                }
                spezifikation {
                  label
                  __typename
                }
                __typename
              }
              zustaende {
                label
                __typename
              }
              werkstoff {
                synonyms
                __typename
              }
              status {
                name
                colour
                icon
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_prufung: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_prufung_values: custWareneingangsbuchMePrufungCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      werkstoffzustaende_prufung_pivot: custWareneingangsbuchWerkstoffzustaendePrufungCollection(
        orderBy: [{zustandId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: zustand {
              id
              werkstoffSpezifikation {
                werkstoff {
                  label
                  __typename
                }
                spezifikation {
                  label
                  __typename
                }
                __typename
              }
              zustaende {
                label
                __typename
              }
              werkstoff {
                synonyms
                __typename
              }
              status {
                name
                colour
                icon
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      gefugeuntersuchung_id: gefugeuntersuchung {
        id
        label
        __typename
      }
      me_validator_referenztest: custWareneingangsbuchWerkstoffzustaendePrufungCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_referenztest_values: custWareneingangsbuchMeReferenztestCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      freigegaben
      __typename
    }
    __typename
  }
  __typename
}
}
Query 3
query loadWareneingangsbuchRowData($id: String) {
rows: custWareneingangsbuchCollection(filter: {id: {eq: $id}}) {
  edges {
    node {
      id
      chargen_nummer: chargenNummer
      werkstoff {
        label
        __typename
      }
      freigegaben
      referenztest
      status_id: status {
        id
        name
        colour
        icon
        __typename
      }
      zeugnis_vorhanden: zeugnisVorhanden
      werkstoff_id: werkstoff {
        id
        label
        status {
          name
          colour
          icon
          __typename
        }
        __typename
      }
      werkstoffzustaende_pivot: custWareneingangsbuchWerkstoffzustaendeCollection(
        orderBy: [{zustandId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: zustand {
              id
              werkstoffSpezifikation {
                werkstoff {
                  label
                  __typename
                }
                spezifikation {
                  label
                  __typename
                }
                __typename
              }
              zustaende {
                label
                __typename
              }
              werkstoff {
                synonyms
                __typename
              }
              status {
                name
                colour
                icon
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      abmessung
      abmessungDimension {
        id
        name
        dimension {
          unit
          __typename
        }
        __typename
      }
      waz_bemerkung: wazBemerkung
      bestelldatum_nummer: bestelldatumNummer
      lieferant_id: lieferantId
      liefermenge
      liefermengeDimension {
        id
        name
        dimension {
          unit
          __typename
        }
        __typename
      }
      eingangsdatum
      waz_art_id: wazArt {
        id
        label
        __typename
      }
      waz_nr: wazNr
      schmelznr
      chemistry_validator: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              werkstoff_spezifikation: werkstoffSpezifikation {
                id
                werkstoff_spezifikation_element: custWerkstoffSpezifikationElementCollection {
                  edges {
                    node {
                      id
                      min
                      max
                      elemente {
                        id
                        name
                        symbol
                        __typename
                      }
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      chemistry_validator_values: custWareneingangsbuchElementeCollection {
        edges {
          node {
            value
            elementeId
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_values: custWareneingangsbuchMeCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      gepr_gg_spec_id: geprGgSpec {
        id
        label
        __typename
      }
      prufung
      wareneingangspruefung
      wareneingangsauftrag
      werkstoffprufunge_pivot: custWareneingangsbuchWerkstoffprufungeCollection(
        orderBy: [{werkstoffprufungeId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: werkstoffprufunge {
              id
              label
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      ultraschall_gepruft: ultraschallGepruft
      chemistry_validator_prufung: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              werkstoff_spezifikation: werkstoffSpezifikation {
                id
                werkstoff_spezifikation_element: custWerkstoffSpezifikationElementCollection {
                  edges {
                    node {
                      id
                      min
                      max
                      elemente {
                        id
                        name
                        symbol
                        __typename
                      }
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      chemistry_validator_prufung_values: custWareneingangsbuchElementePrufungCollection {
        edges {
          node {
            value
            elementeId
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_prufung: custWareneingangsbuchWerkstoffzustaendeCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_prufung_values: custWareneingangsbuchMePrufungCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      werkstoffzustaende_prufung_pivot: custWareneingangsbuchWerkstoffzustaendePrufungCollection(
        orderBy: [{zustandId: AscNullsFirst}]
      ) {
        edges {
          node {
            id
            pivotLabel: zustand {
              id
              werkstoffSpezifikation {
                werkstoff {
                  label
                  __typename
                }
                spezifikation {
                  label
                  __typename
                }
                __typename
              }
              zustaende {
                label
                __typename
              }
              werkstoff {
                synonyms
                __typename
              }
              status {
                name
                colour
                icon
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      gefugeuntersuchung_id: gefugeuntersuchung {
        id
        label
        __typename
      }
      freigabe_datum: freigabeDatum
      bemerkungen
      createdAt
      updatedAt
      me_validator_referenztest: custWareneingangsbuchWerkstoffzustaendePrufungCollection {
        edges {
          node {
            id
            zustand {
              id
              zustand_me: custZustandMeCollection {
                edges {
                  node {
                    id
                    min
                    max
                    mechanische_eigenschaften: mechanischeEigenschaften {
                      id
                      symbol
                      __typename
                    }
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      me_validator_referenztest_values: custWareneingangsbuchMeReferenztestCollection {
        edges {
          node {
            value
            mechanischeEigenschaftenId
            __typename
          }
          __typename
        }
        __typename
      }
      lieferung
      materialbeistellung
      freigegaben_von: freigegabenVon
      __typename
    }
    __typename
  }
  pageInfo {
    startCursor
    endCursor
    hasNextPage
    hasPreviousPage
    __typename
  }
  totalCount
  __typename
}
}

Expected behavior Queries do not slow down exponentially between runs where a user executes other queries.

Screenshots One load test example (hitting the /graphql/v1 endpoint locally with the queries above + a few others):

  • On startup the request times are very slow (the max time shown), but after about 10s they normalise to the point where the 99%ile is under 100ms
  • The 99%ile continues to drop slowly towards being under 50ms which I feel implies most/all requests continue to be as fast as we hope
  • If I start using the application as this is going on the pages that use these queries resolve super fast, but if I start going to pages which send different GQL queries the load test will start seeing slow requests again

image

Versions:

  • PostgreSQL: 14.1 (Supabase SaaS), 14.2 (cli)
  • pg_graphql commit ref: (unsure, I've been testing this today on the Supabase SaaS and Supabase CLI v0.25.0)

Additional context I've tried getting the SQL generated by pg_graphql so I can see if it's an issue with the query itself/something in Postgres, but I could not find a simple way to do this. Is there a way to pull out the generated SQL query from pg_graphql?

From my experimenting, it feels like running more than a few different GQL queries clears old queries out of the cache. Then when the old queries are executed again, the SQL is getting regenereted as it's not longer cached. If so, is there a way to increase the cache size? Our application has a lot of unique queries and the number of these will only grow over time. I may also have misunderstood what is being cached.

I hope that this is enough information, if not I will do what I can to provide more context. Thank you in advance for the help and for making this extension!

Flambe avatar Jun 09 '22 14:06 Flambe

Thank you for providing such complete stats, that's great context

Everything in your queries looks pretty reasonable. pg_graphql does use a prepared statement cache which may account for a small fraction ( 1-10 ms) of the differences when hot/cold.

Based on the description of inconsistent behavior that slowly improves when shown the same query multiple times, it sounds more like there are some indexes missing

Specifically, if you make sure there are indexes on:

  • all foreign key columns e.g. custWerkstoffSpezifikationElementId
  • all sorting clauses e.g. zustandId

you should see much much more consistent response times


If those indexes already exist, another way you could see this kind of inconsistent performance is if the indexes don't all fit in available memory on the pg server. In that case, postgres may choose to swap indexes in and out of memory depending on what query is being executed

olirice avatar Jun 13 '22 15:06 olirice

Thank you for the suggestions and info!

I've tried:

  • Adding an index to all foreign keys & columns we're sorting on
  • Adding missing composite unique keys on pivot tables

I tried using the product during and after the above and although it sometimes loaded faster, it was still mostly returning the requests after a few seconds.

Our data sets are very small at the moment (all of the tables involved in the query have less than 100 rows each). I checked the resource usage with docker stats and the DB is only using a small amount of the available memory, so I do not see why it would need to swap indexes in and out of memory (but I am not experienced here so I may be missing something). When running the query, CPU does spike to 100%+ but memory only goes up to ~300MiB usage. image

Figuring that I might need more specific indexes, I tried running explain analyze on what appears to be the SQL that runs the graphql query (I pulled this from the postgres logs on Supabase SaaS), but the analysis didn't cover the actual query I am looking to debug. Where the query actually runs, it just says that it's running a sub query that takes the entire amount of time which doesn't seem that useful.

Found query
WITH pgrst_source AS (WITH pgrst_payload AS (SELECT $1::json AS json_data),
                           pgrst_body AS (SELECT CASE
                                                     WHEN json_typeof(json_data) = 'array' THEN json_data
                                                     ELSE json_build_array(json_data) END AS val
                                          FROM pgrst_payload),
                           pgrst_args AS (SELECT *
                                          FROM json_to_recordset((SELECT val FROM pgrst_body)) AS _("operationName" text, "query" text, "variables" jsonb))
                      SELECT "graphql_public"."graphql"(
                                     "operationName" := (SELECT "operationName" FROM pgrst_args LIMIT 1),
                                     "query" := (SELECT "query" FROM pgrst_args LIMIT 1),
                                     "variables" := (SELECT "variables" FROM pgrst_args LIMIT 1)) AS pgrst_scalar)
SELECT  null::bigint                                                       AS total_result_set,
       pg_catalog.count(_postgrest_t)                                     AS page_total,
       coalesce((json_agg(_postgrest_t.pgrst_scalar) -> 0)::text, 'null') AS body,
       nullif(current_setting('response.headers', true), '')              AS response_headers,
       nullif(current_setting('response.status', true), '')               AS response_status
FROM (SELECT "pgrst_source".*FROM "pgrst_source" LIMIT $2 OFFSET $3) _postgrest_t
Explain result
QUERY PLAN                                                                                                                              |
----------------------------------------------------------------------------------------------------------------------------------------+
Aggregate  (cost=1.37..1.40 rows=1 width=112) (actual time=2482.476..2482.480 rows=1 loops=1)                                           |
  CTE pgrst_source                                                                                                                      |
    ->  Result  (cost=1.07..1.33 rows=1 width=32) (actual time=2481.936..2481.940 rows=1 loops=1)                                       |
          CTE pgrst_args                                                                                                                |
            ->  Function Scan on json_to_recordset _  (cost=0.02..1.01 rows=100 width=96) (actual time=0.137..0.137 rows=1 loops=1)     |
                  InitPlan 1 (returns $0)                                                                                               |
                    ->  Result  (cost=0.00..0.01 rows=1 width=32) (actual time=0.007..0.008 rows=1 loops=1)                             |
          InitPlan 3 (returns $2)                                                                                                       |
            ->  Limit  (cost=0.00..0.02 rows=1 width=32) (actual time=0.140..0.141 rows=1 loops=1)                                      |
                  ->  CTE Scan on pgrst_args  (cost=0.00..2.00 rows=100 width=32) (actual time=0.140..0.140 rows=1 loops=1)             |
          InitPlan 4 (returns $3)                                                                                                       |
            ->  Limit  (cost=0.00..0.02 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=1)                                      |
                  ->  CTE Scan on pgrst_args pgrst_args_1  (cost=0.00..2.00 rows=100 width=32) (actual time=0.005..0.005 rows=1 loops=1)|
          InitPlan 5 (returns $4)                                                                                                       |
            ->  Limit  (cost=0.00..0.02 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=1)                                      |
                  ->  CTE Scan on pgrst_args pgrst_args_2  (cost=0.00..2.00 rows=100 width=32) (actual time=0.003..0.003 rows=1 loops=1)|
  ->  Subquery Scan on _postgrest_t  (cost=0.00..0.03 rows=1 width=88) (actual time=2481.949..2481.951 rows=1 loops=1)                  |
        ->  Limit  (cost=0.00..0.02 rows=1 width=32) (actual time=2481.944..2481.945 rows=1 loops=1)                                    |
              ->  CTE Scan on pgrst_source  (cost=0.00..0.02 rows=1 width=32) (actual time=2481.943..2481.944 rows=1 loops=1)           |
Planning Time: 0.217 ms                                                                                                                 |
Execution Time: 2482.533 ms                                                                                                             |

Is it possible to generate the SQL from the GQL without executing it so I can run explain analyze against it? (I couldn't see an obvious way to do this in the docs or trying to look through the code)

Flambe avatar Jun 14 '22 11:06 Flambe

Interesting that CPU is an issue with such a small data set. I'm not sure what would cause that

The best way to get at the SQL query is to look it up in the prepared statement cache

First create a new connection to postgres so there will only prepared statement to look at and then:

-- Create a book table
create table book (
    id int primary key
);

-- Create one book record
insert into book(id) values (1);

-- Query all books (this creates a prepared statement)
select graphql.resolve($$ { bookCollection { edges { node { id } } } } $$, null, null)

-- Get the prepared statement's body
select statement from pg_prepared_statements

That will return

prepare bbaddcac14a640d3e93d5fedcf58b903  as 
    (
        with xyz_tot as (
            select
                count(1) as __total_count
            from
                book as ff9076bf7bf
            where
                false
                -- join clause
                and true
                -- where clause
                and true
        ),
        -- might contain 1 extra row
        xyz_maybe_extra as (
            select
                graphql.encode(jsonb_build_array(to_jsonb(ff9076bf7bf.id)))::text as __cursor,
                row_number() over () as __page_row_num_for_page_size,
                ff9076bf7bf.id -- all requested columns
            from
                book as ff9076bf7bf
            where
                true
                --pagination_clause
                and ((null is null) or ((
                    (     ff9076bf7bf.id > ((graphql.decode(null)) ->> 0)::integer or (ff9076bf7bf.id is not null and ((graphql.decode(null)) ->> 0)::integer is null and false))
                     or ((ff9076bf7bf.id = ((graphql.decode(null)) ->> 0)::integer  or (ff9076bf7bf.id is null and ((graphql.decode(null)) ->> 0)::integer is null))            and false)
                )))
                -- join clause
                and true
                -- where clause
                and true
            order by
                ff9076bf7bf.id asc nulls last
            limit
                least(30, 30) + 1
        ),
        xyz as (
            select
                *,
                max(ff9076bf7bf.__page_row_num_for_page_size) over () > least(30, 30) as __has_next_page,
                row_number() over () as __page_row_num
            from
                xyz_maybe_extra as ff9076bf7bf
            order by
                ff9076bf7bf.id asc nulls last
            limit
                least(30, 30)
        )
        select
            jsonb_build_object('edges', coalesce(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', ff9076bf7bf.id))), jsonb_build_array()))
        from
        (
            select
                *
            from
                xyz,
                xyz_tot
            order by
                xyz.id asc nulls last
        ) as ff9076bf7bf
    )
    

olirice avatar Jun 14 '22 13:06 olirice

That worked perfectly to get the SQL, thanks for the simple example!

I used your example to get the prepare statement SQL for one of my queries. I then tried running EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) execute "97077150f93ccae1a950f7da8184f2b6"(44); so I can figure out where the potential issues are, but this always returns within 30ms, often around 10ms. I figured that this may be as the query was run very recently, so in an attempt to remove any caching from postgres I've tried: hitting a lot of other queries; copying the prepare SQL into a new connection and running it on its' own there followed by the explain; filtering for different records; and even modifiying bits of the prepare statement (but I presume that removing parts like true = true actually does nothing as it's likely already optimised out). None of this seemed to change it though and the explain still ran in under 30ms.

Interestingly if I execute the prepared statement directly then immediately run the GQL query, the GQL query still takes a few seconds to return.

Am I correct in thinking that this points to the query/indexes working effectively?

When only using the prepared statement to run the query, the CPU doesn't seem to spike at all (though it only updates every second so the spike may not be visible).

One of the analyses from the explain call
[
  {
    "Plan": {
      "Node Type": "Aggregate",
      "Strategy": "Plain",
      "Partial Mode": "Simple",
      "Parallel Aware": false,
      "Async Capable": false,
      "Startup Cost": 130.87,
      "Total Cost": 130.89,
      "Plan Rows": 1,
      "Plan Width": 32,
      "Actual Startup Time": 6.101,
      "Actual Total Time": 6.176,
      "Actual Rows": 1,
      "Actual Loops": 1,
      "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (efeb40767e2.id)::text, 'zeugnis_vorhanden', efeb40767e2.zeugnis_vorhanden, 'waz_bemerkung', efeb40767e2.waz_bemerkung, 'waz_art_id', (SubPlan 1), 'waz_nr', efeb40767e2.waz_nr, 'schmelznr', efeb40767e2.schmelznr, 'chemistry_validator', (SubPlan 6), 'chemistry_validator_values', (SubPlan 7), 'werkstoffzustaende_pivot', (SubPlan 15), 'me_validator', (SubPlan 19), 'me_validator_values', (SubPlan 20), 'gepr_gg_spec_id', (SubPlan 21), 'werkstoffprufunge_pivot', (SubPlan 23), 'freigegaben', efeb40767e2.freigegaben, '__typename', 'CustWareneingangsbuch'), '__typename', 'CustWareneingangsbuchEdge')), jsonb_build_array()))"],
      "Shared Hit Blocks": 117,
      "Shared Read Blocks": 0,
      "Shared Dirtied Blocks": 0,
      "Shared Written Blocks": 0,
      "Local Hit Blocks": 0,
      "Local Read Blocks": 0,
      "Local Dirtied Blocks": 0,
      "Local Written Blocks": 0,
      "Temp Read Blocks": 0,
      "Temp Written Blocks": 0,
      "Plans": [
        {
          "Node Type": "Nested Loop",
          "Parent Relationship": "Outer",
          "Parallel Aware": false,
          "Async Capable": false,
          "Join Type": "Inner",
          "Startup Cost": 1.38,
          "Total Cost": 1.43,
          "Plan Rows": 1,
          "Plan Width": 440,
          "Actual Startup Time": 0.048,
          "Actual Total Time": 0.055,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2.waz_bemerkung", "efeb40767e2.waz_nr", "efeb40767e2.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.gepr_gg_spec_id", "efeb40767e2.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.waz_art_id", "NULL::bigint", "NULL::uuid", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
          "Inner Unique": false,
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Limit",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 1.38,
              "Total Cost": 1.39,
              "Plan Rows": 1,
              "Plan Width": 432,
              "Actual Startup Time": 0.042,
              "Actual Total Time": 0.046,
              "Actual Rows": 1,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2.waz_bemerkung", "efeb40767e2.waz_nr", "efeb40767e2.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.gepr_gg_spec_id", "efeb40767e2.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.waz_art_id", "NULL::bigint", "NULL::uuid", "NULL::boolean", "NULL::bigint"],
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Sort",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.38,
                  "Total Cost": 1.39,
                  "Plan Rows": 1,
                  "Plan Width": 432,
                  "Actual Startup Time": 0.041,
                  "Actual Total Time": 0.044,
                  "Actual Rows": 1,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2.waz_bemerkung", "efeb40767e2.waz_nr", "efeb40767e2.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.gepr_gg_spec_id", "efeb40767e2.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.waz_art_id", "NULL::bigint", "NULL::uuid", "NULL::boolean", "NULL::bigint"],
                  "Sort Key": ["efeb40767e2.id"],
                  "Sort Method": "quicksort",
                  "Sort Space Used": 25,
                  "Sort Space Type": "Memory",
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "efeb40767e2",
                      "Startup Cost": 0.00,
                      "Total Cost": 1.37,
                      "Plan Rows": 1,
                      "Plan Width": 432,
                      "Actual Startup Time": 0.026,
                      "Actual Total Time": 0.032,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2.waz_bemerkung", "efeb40767e2.waz_nr", "efeb40767e2.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.gepr_gg_spec_id", "efeb40767e2.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2.waz_art_id", "NULL::bigint", "NULL::uuid", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 1.36,
                          "Plan Rows": 1,
                          "Plan Width": 423,
                          "Actual Startup Time": 0.023,
                          "Actual Total Time": 0.028,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2_1.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2_1.waz_bemerkung", "efeb40767e2_1.waz_nr", "efeb40767e2_1.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2_1.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2_1.gepr_gg_spec_id", "efeb40767e2_1.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2_1.waz_art_id", "NULL::bigint", "NULL::uuid"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Seq Scan",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Relation Name": "cust_wareneingangsbuch",
                              "Schema": "public",
                              "Alias": "efeb40767e2_1",
                              "Startup Cost": 0.00,
                              "Total Cost": 1.36,
                              "Plan Rows": 1,
                              "Plan Width": 423,
                              "Actual Startup Time": 0.023,
                              "Actual Total Time": 0.026,
                              "Actual Rows": 1,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "NULL::character varying", "efeb40767e2_1.schmelznr", "NULL::character varying", "NULL::character varying", "efeb40767e2_1.waz_bemerkung", "efeb40767e2_1.waz_nr", "efeb40767e2_1.freigegaben", "NULL::boolean", "NULL::boolean", "NULL::boolean", "NULL::boolean", "efeb40767e2_1.zeugnis_vorhanden", "NULL::date", "NULL::date", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2_1.gepr_gg_spec_id", "efeb40767e2_1.id", "NULL::bigint", "NULL::bigint", "NULL::bigint", "efeb40767e2_1.waz_art_id", "NULL::bigint", "NULL::uuid"],
                              "Filter": "(efeb40767e2_1.id = '44'::bigint)",
                              "Rows Removed by Filter": 28,
                              "Shared Hit Blocks": 1,
                              "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": "Result",
              "Parent Relationship": "Inner",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 0.00,
              "Total Cost": 0.01,
              "Plan Rows": 1,
              "Plan Width": 8,
              "Actual Startup Time": 0.001,
              "Actual Total Time": 0.002,
              "Actual Rows": 1,
              "Actual Loops": 1,
              "Output": ["NULL::bigint"],
              "Shared Hit Blocks": 0,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0
            }
          ]
        },
        {
          "Node Type": "Limit",
          "Parent Relationship": "SubPlan",
          "Subplan Name": "SubPlan 1",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 0.00,
          "Total Cost": 1.07,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.016,
          "Actual Total Time": 0.018,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["(jsonb_build_object('id', (\"8448f733895\".id)::text, 'label', \"8448f733895\".label, '__typename', 'CustWazArt'))"],
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Seq Scan",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Relation Name": "cust_waz_art",
              "Schema": "public",
              "Alias": "8448f733895",
              "Startup Cost": 0.00,
              "Total Cost": 1.07,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.016,
              "Actual Total Time": 0.017,
              "Actual Rows": 1,
              "Actual Loops": 1,
              "Output": ["jsonb_build_object('id', (\"8448f733895\".id)::text, 'label', \"8448f733895\".label, '__typename', 'CustWazArt')"],
              "Filter": "(\"8448f733895\".id = efeb40767e2.waz_art_id)",
              "Rows Removed by Filter": 2,
              "Shared Hit Blocks": 1,
              "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 6",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 55.48,
          "Total Cost": 55.50,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 1.995,
          "Actual Total Time": 2.020,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchWerkstoffzustaendeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (\"2dd7634e0d6\".id)::text, 'zustand', (SubPlan 5), '__typename', 'CustWareneingangsbuchWerkstoffzustaende'), '__typename', 'CustWareneingangsbuchWerkstoffzustaendeEdge')), jsonb_build_array()))"],
          "Shared Hit Blocks": 49,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 1.12,
              "Total Cost": 1.22,
              "Plan Rows": 2,
              "Plan Width": 97,
              "Actual Startup Time": 0.022,
              "Actual Total Time": 0.036,
              "Actual Rows": 3,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6\".id", "NULL::bigint", "\"2dd7634e0d6\".zustand_id", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.12,
                  "Total Cost": 1.15,
                  "Plan Rows": 2,
                  "Plan Width": 89,
                  "Actual Startup Time": 0.016,
                  "Actual Total Time": 0.023,
                  "Actual Rows": 3,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6\".id", "NULL::bigint", "\"2dd7634e0d6\".zustand_id", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "2dd7634e0d6",
                      "Startup Cost": 1.12,
                      "Total Cost": 1.15,
                      "Plan Rows": 2,
                      "Plan Width": 89,
                      "Actual Startup Time": 0.016,
                      "Actual Total Time": 0.021,
                      "Actual Rows": 3,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6\".id", "NULL::bigint", "\"2dd7634e0d6\".zustand_id", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 1.12,
                          "Total Cost": 1.13,
                          "Plan Rows": 2,
                          "Plan Width": 80,
                          "Actual Startup Time": 0.013,
                          "Actual Total Time": 0.016,
                          "Actual Rows": 3,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6_1\".id", "NULL::bigint", "\"2dd7634e0d6_1\".zustand_id"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 1.12,
                              "Total Cost": 1.13,
                              "Plan Rows": 2,
                              "Plan Width": 80,
                              "Actual Startup Time": 0.013,
                              "Actual Total Time": 0.014,
                              "Actual Rows": 3,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6_1\".id", "NULL::bigint", "\"2dd7634e0d6_1\".zustand_id"],
                              "Sort Key": ["\"2dd7634e0d6_1\".id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 1,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_werkstoffzustaende",
                                  "Schema": "public",
                                  "Alias": "2dd7634e0d6_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.11,
                                  "Plan Rows": 2,
                                  "Plan Width": 80,
                                  "Actual Startup Time": 0.007,
                                  "Actual Total Time": 0.008,
                                  "Actual Rows": 3,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"2dd7634e0d6_1\".id", "NULL::bigint", "\"2dd7634e0d6_1\".zustand_id"],
                                  "Filter": "(\"2dd7634e0d6_1\".wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 6,
                                  "Shared Hit Blocks": 1,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.002,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_1",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.002,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.000,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Node Type": "Limit",
              "Parent Relationship": "SubPlan",
              "Subplan Name": "SubPlan 5",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 0.00,
              "Total Cost": 27.11,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.470,
              "Actual Total Time": 0.476,
              "Actual Rows": 1,
              "Actual Loops": 3,
              "Output": ["(jsonb_build_object('id', (cee86a8c371.id)::text, 'werkstoff_spezifikation', (SubPlan 4), '__typename', 'CustZustand'))"],
              "Shared Hit Blocks": 48,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Seq Scan",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Relation Name": "cust_zustand",
                  "Schema": "public",
                  "Alias": "cee86a8c371",
                  "Startup Cost": 0.00,
                  "Total Cost": 27.11,
                  "Plan Rows": 1,
                  "Plan Width": 32,
                  "Actual Startup Time": 0.469,
                  "Actual Total Time": 0.474,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "Output": ["jsonb_build_object('id', (cee86a8c371.id)::text, 'werkstoff_spezifikation', (SubPlan 4), '__typename', 'CustZustand')"],
                  "Filter": "(cee86a8c371.id = \"2dd7634e0d6\".zustand_id)",
                  "Rows Removed by Filter": 41,
                  "Shared Hit Blocks": 48,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Limit",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 4",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 0.00,
                      "Total Cost": 23.13,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.424,
                      "Actual Total Time": 0.429,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["(jsonb_build_object('id', (f3768bb4b34.id)::text, 'werkstoff_spezifikation_element', (SubPlan 3), '__typename', 'CustWerkstoffSpezifikation'))"],
                      "Shared Hit Blocks": 43,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Relation Name": "cust_werkstoff_spezifikation",
                          "Schema": "public",
                          "Alias": "f3768bb4b34",
                          "Startup Cost": 0.00,
                          "Total Cost": 23.13,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.423,
                          "Actual Total Time": 0.426,
                          "Actual Rows": 1,
                          "Actual Loops": 3,
                          "Output": ["jsonb_build_object('id', (f3768bb4b34.id)::text, 'werkstoff_spezifikation_element', (SubPlan 3), '__typename', 'CustWerkstoffSpezifikation')"],
                          "Filter": "(f3768bb4b34.id = cee86a8c371.werkstoff_spezifikation_id)",
                          "Rows Removed by Filter": 3,
                          "Shared Hit Blocks": 43,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Aggregate",
                              "Strategy": "Plain",
                              "Partial Mode": "Simple",
                              "Parent Relationship": "SubPlan",
                              "Subplan Name": "SubPlan 3",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 21.69,
                              "Total Cost": 21.71,
                              "Plan Rows": 1,
                              "Plan Width": 32,
                              "Actual Startup Time": 0.386,
                              "Actual Total Time": 0.390,
                              "Actual Rows": 1,
                              "Actual Loops": 3,
                              "Output": ["jsonb_build_object('__typename', 'CustWerkstoffSpezifikationElementConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (\"31ce540134e\".id)::text, 'min', \"31ce540134e\".min, 'max', \"31ce540134e\".max, 'elemente', (SubPlan 2), '__typename', 'CustWerkstoffSpezifikationElement'), '__typename', 'CustWerkstoffSpezifikationElementEdge')), jsonb_build_array()))"],
                              "Shared Hit Blocks": 40,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Nested Loop",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Join Type": "Inner",
                                  "Startup Cost": 5.69,
                                  "Total Cost": 6.10,
                                  "Plan Rows": 11,
                                  "Plan Width": 113,
                                  "Actual Startup Time": 0.054,
                                  "Actual Total Time": 0.074,
                                  "Actual Rows": 10,
                                  "Actual Loops": 3,
                                  "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e\".max", "\"31ce540134e\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e\".elemente_id", "\"31ce540134e\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
                                  "Inner Unique": false,
                                  "Shared Hit Blocks": 9,
                                  "Shared Read Blocks": 0,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "Plans": [
                                    {
                                      "Node Type": "Limit",
                                      "Parent Relationship": "Outer",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 5.69,
                                      "Total Cost": 5.83,
                                      "Plan Rows": 11,
                                      "Plan Width": 105,
                                      "Actual Startup Time": 0.052,
                                      "Actual Total Time": 0.062,
                                      "Actual Rows": 10,
                                      "Actual Loops": 3,
                                      "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e\".max", "\"31ce540134e\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e\".elemente_id", "\"31ce540134e\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                                      "Shared Hit Blocks": 9,
                                      "Shared Read Blocks": 0,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "Plans": [
                                        {
                                          "Node Type": "Subquery Scan",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Async Capable": false,
                                          "Alias": "31ce540134e",
                                          "Startup Cost": 5.69,
                                          "Total Cost": 5.83,
                                          "Plan Rows": 11,
                                          "Plan Width": 105,
                                          "Actual Startup Time": 0.051,
                                          "Actual Total Time": 0.059,
                                          "Actual Rows": 10,
                                          "Actual Loops": 3,
                                          "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e\".max", "\"31ce540134e\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e\".elemente_id", "\"31ce540134e\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                                          "Shared Hit Blocks": 9,
                                          "Shared Read Blocks": 0,
                                          "Shared Dirtied Blocks": 0,
                                          "Shared Written Blocks": 0,
                                          "Local Hit Blocks": 0,
                                          "Local Read Blocks": 0,
                                          "Local Dirtied Blocks": 0,
                                          "Local Written Blocks": 0,
                                          "Temp Read Blocks": 0,
                                          "Temp Written Blocks": 0,
                                          "Plans": [
                                            {
                                              "Node Type": "Limit",
                                              "Parent Relationship": "Subquery",
                                              "Parallel Aware": false,
                                              "Async Capable": false,
                                              "Startup Cost": 5.69,
                                              "Total Cost": 5.72,
                                              "Plan Rows": 11,
                                              "Plan Width": 96,
                                              "Actual Startup Time": 0.050,
                                              "Actual Total Time": 0.053,
                                              "Actual Rows": 10,
                                              "Actual Loops": 3,
                                              "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e_1\".max", "\"31ce540134e_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e_1\".elemente_id", "\"31ce540134e_1\".id", "NULL::bigint"],
                                              "Shared Hit Blocks": 9,
                                              "Shared Read Blocks": 0,
                                              "Shared Dirtied Blocks": 0,
                                              "Shared Written Blocks": 0,
                                              "Local Hit Blocks": 0,
                                              "Local Read Blocks": 0,
                                              "Local Dirtied Blocks": 0,
                                              "Local Written Blocks": 0,
                                              "Temp Read Blocks": 0,
                                              "Temp Written Blocks": 0,
                                              "Plans": [
                                                {
                                                  "Node Type": "Sort",
                                                  "Parent Relationship": "Outer",
                                                  "Parallel Aware": false,
                                                  "Async Capable": false,
                                                  "Startup Cost": 5.69,
                                                  "Total Cost": 5.72,
                                                  "Plan Rows": 11,
                                                  "Plan Width": 96,
                                                  "Actual Startup Time": 0.049,
                                                  "Actual Total Time": 0.050,
                                                  "Actual Rows": 10,
                                                  "Actual Loops": 3,
                                                  "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e_1\".max", "\"31ce540134e_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e_1\".elemente_id", "\"31ce540134e_1\".id", "NULL::bigint"],
                                                  "Sort Key": ["\"31ce540134e_1\".id"],
                                                  "Sort Method": "quicksort",
                                                  "Sort Space Used": 26,
                                                  "Sort Space Type": "Memory",
                                                  "Shared Hit Blocks": 9,
                                                  "Shared Read Blocks": 0,
                                                  "Shared Dirtied Blocks": 0,
                                                  "Shared Written Blocks": 0,
                                                  "Local Hit Blocks": 0,
                                                  "Local Read Blocks": 0,
                                                  "Local Dirtied Blocks": 0,
                                                  "Local Written Blocks": 0,
                                                  "Temp Read Blocks": 0,
                                                  "Temp Written Blocks": 0,
                                                  "Plans": [
                                                    {
                                                      "Node Type": "Seq Scan",
                                                      "Parent Relationship": "Outer",
                                                      "Parallel Aware": false,
                                                      "Async Capable": false,
                                                      "Relation Name": "cust_werkstoff_spezifikation_element",
                                                      "Schema": "public",
                                                      "Alias": "31ce540134e_1",
                                                      "Startup Cost": 0.00,
                                                      "Total Cost": 5.50,
                                                      "Plan Rows": 11,
                                                      "Plan Width": 96,
                                                      "Actual Startup Time": 0.030,
                                                      "Actual Total Time": 0.041,
                                                      "Actual Rows": 10,
                                                      "Actual Loops": 3,
                                                      "Output": ["NULL::text", "NULL::bigint", "\"31ce540134e_1\".max", "\"31ce540134e_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"31ce540134e_1\".elemente_id", "\"31ce540134e_1\".id", "NULL::bigint"],
                                                      "Filter": "(\"31ce540134e_1\".werkstoff_spezifikation_id = f3768bb4b34.id)",
                                                      "Rows Removed by Filter": 190,
                                                      "Shared Hit Blocks": 9,
                                                      "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": "Materialize",
                                      "Parent Relationship": "Inner",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 0.00,
                                      "Total Cost": 0.03,
                                      "Plan Rows": 1,
                                      "Plan Width": 0,
                                      "Actual Startup Time": 0.000,
                                      "Actual Total Time": 0.000,
                                      "Actual Rows": 1,
                                      "Actual Loops": 31,
                                      "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,
                                      "Plans": [
                                        {
                                          "Node Type": "Subquery Scan",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Async Capable": false,
                                          "Alias": "xyz_tot",
                                          "Startup Cost": 0.00,
                                          "Total Cost": 0.02,
                                          "Plan Rows": 1,
                                          "Plan Width": 0,
                                          "Actual Startup Time": 0.001,
                                          "Actual Total Time": 0.002,
                                          "Actual Rows": 1,
                                          "Actual Loops": 1,
                                          "Shared Hit Blocks": 0,
                                          "Shared Read Blocks": 0,
                                          "Shared Dirtied Blocks": 0,
                                          "Shared Written Blocks": 0,
                                          "Local Hit Blocks": 0,
                                          "Local Read Blocks": 0,
                                          "Local Dirtied Blocks": 0,
                                          "Local Written Blocks": 0,
                                          "Temp Read Blocks": 0,
                                          "Temp Written Blocks": 0,
                                          "Plans": [
                                            {
                                              "Node Type": "Result",
                                              "Parent Relationship": "Subquery",
                                              "Parallel Aware": false,
                                              "Async Capable": false,
                                              "Startup Cost": 0.00,
                                              "Total Cost": 0.01,
                                              "Plan Rows": 1,
                                              "Plan Width": 8,
                                              "Actual Startup Time": 0.000,
                                              "Actual Total Time": 0.001,
                                              "Actual Rows": 1,
                                              "Actual Loops": 1,
                                              "Output": ["NULL::bigint"],
                                              "Shared Hit Blocks": 0,
                                              "Shared Read Blocks": 0,
                                              "Shared Dirtied Blocks": 0,
                                              "Shared Written Blocks": 0,
                                              "Local Hit Blocks": 0,
                                              "Local Read Blocks": 0,
                                              "Local Dirtied Blocks": 0,
                                              "Local Written Blocks": 0,
                                              "Temp Read Blocks": 0,
                                              "Temp Written Blocks": 0
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "Node Type": "Limit",
                                  "Parent Relationship": "SubPlan",
                                  "Subplan Name": "SubPlan 2",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.40,
                                  "Plan Rows": 1,
                                  "Plan Width": 32,
                                  "Actual Startup Time": 0.009,
                                  "Actual Total Time": 0.009,
                                  "Actual Rows": 1,
                                  "Actual Loops": 31,
                                  "Output": ["(jsonb_build_object('id', (\"7b8ade30c4d\".id)::text, 'name', \"7b8ade30c4d\".name, 'symbol', \"7b8ade30c4d\".symbol, '__typename', 'CustElemente'))"],
                                  "Shared Hit Blocks": 31,
                                  "Shared Read Blocks": 0,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "Plans": [
                                    {
                                      "Node Type": "Seq Scan",
                                      "Parent Relationship": "Outer",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Relation Name": "cust_elemente",
                                      "Schema": "public",
                                      "Alias": "7b8ade30c4d",
                                      "Startup Cost": 0.00,
                                      "Total Cost": 1.40,
                                      "Plan Rows": 1,
                                      "Plan Width": 32,
                                      "Actual Startup Time": 0.008,
                                      "Actual Total Time": 0.008,
                                      "Actual Rows": 1,
                                      "Actual Loops": 31,
                                      "Output": ["jsonb_build_object('id', (\"7b8ade30c4d\".id)::text, 'name', \"7b8ade30c4d\".name, 'symbol', \"7b8ade30c4d\".symbol, '__typename', 'CustElemente')"],
                                      "Filter": "(\"7b8ade30c4d\".id = \"31ce540134e\".elemente_id)",
                                      "Rows Removed by Filter": 12,
                                      "Shared Hit Blocks": 31,
                                      "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 7",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 9.53,
          "Total Cost": 9.54,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.126,
          "Actual Total Time": 0.134,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchElementeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('value', \"1cea82ffb6a\".value, 'elementeId', (\"1cea82ffb6a\".elemente_id)::text, '__typename', 'CustWareneingangsbuchElemente'), '__typename', 'CustWareneingangsbuchElementeEdge')), jsonb_build_array()))"],
          "Shared Hit Blocks": 8,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 9.10,
              "Total Cost": 9.37,
              "Plan Rows": 7,
              "Plan Width": 105,
              "Actual Startup Time": 0.043,
              "Actual Total Time": 0.059,
              "Actual Rows": 5,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a\".elemente_id", "\"1cea82ffb6a\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 8,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 9.10,
                  "Total Cost": 9.19,
                  "Plan Rows": 7,
                  "Plan Width": 97,
                  "Actual Startup Time": 0.037,
                  "Actual Total Time": 0.045,
                  "Actual Rows": 5,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a\".elemente_id", "\"1cea82ffb6a\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 8,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "1cea82ffb6a",
                      "Startup Cost": 9.10,
                      "Total Cost": 9.19,
                      "Plan Rows": 7,
                      "Plan Width": 97,
                      "Actual Startup Time": 0.037,
                      "Actual Total Time": 0.043,
                      "Actual Rows": 5,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a\".elemente_id", "\"1cea82ffb6a\".id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 8,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 9.10,
                          "Total Cost": 9.12,
                          "Plan Rows": 7,
                          "Plan Width": 88,
                          "Actual Startup Time": 0.035,
                          "Actual Total Time": 0.038,
                          "Actual Rows": 5,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a_1\".elemente_id", "\"1cea82ffb6a_1\".id", "NULL::bigint"],
                          "Shared Hit Blocks": 8,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 9.10,
                              "Total Cost": 9.12,
                              "Plan Rows": 7,
                              "Plan Width": 88,
                              "Actual Startup Time": 0.034,
                              "Actual Total Time": 0.036,
                              "Actual Rows": 5,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a_1\".elemente_id", "\"1cea82ffb6a_1\".id", "NULL::bigint"],
                              "Sort Key": ["\"1cea82ffb6a_1\".id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 8,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_elemente",
                                  "Schema": "public",
                                  "Alias": "1cea82ffb6a_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 9.00,
                                  "Plan Rows": 7,
                                  "Plan Width": 88,
                                  "Actual Startup Time": 0.018,
                                  "Actual Total Time": 0.029,
                                  "Actual Rows": 5,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "\"1cea82ffb6a_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"1cea82ffb6a_1\".elemente_id", "\"1cea82ffb6a_1\".id", "NULL::bigint"],
                                  "Filter": "(\"1cea82ffb6a_1\".wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 75,
                                  "Shared Hit Blocks": 8,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.001,
                  "Actual Rows": 1,
                  "Actual Loops": 5,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_2",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.003,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.001,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "Node Type": "Aggregate",
          "Strategy": "Plain",
          "Partial Mode": "Simple",
          "Parent Relationship": "SubPlan",
          "Subplan Name": "SubPlan 15",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 24.83,
          "Total Cost": 24.85,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.434,
          "Actual Total Time": 0.446,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchWerkstoffzustaendeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (\"218c68c7a94\".id)::text, 'pivotLabel', (SubPlan 14), '__typename', 'CustWareneingangsbuchWerkstoffzustaende'), '__typename', 'CustWareneingangsbuchWerkstoffzustaendeEdge')), jsonb_build_array()))"],
          "Shared Hit Blocks": 24,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 1.12,
              "Total Cost": 1.22,
              "Plan Rows": 2,
              "Plan Width": 97,
              "Actual Startup Time": 0.024,
              "Actual Total Time": 0.035,
              "Actual Rows": 3,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94\".id", "NULL::bigint", "\"218c68c7a94\".zustand_id", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.12,
                  "Total Cost": 1.15,
                  "Plan Rows": 2,
                  "Plan Width": 89,
                  "Actual Startup Time": 0.020,
                  "Actual Total Time": 0.025,
                  "Actual Rows": 3,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94\".id", "NULL::bigint", "\"218c68c7a94\".zustand_id", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "218c68c7a94",
                      "Startup Cost": 1.12,
                      "Total Cost": 1.15,
                      "Plan Rows": 2,
                      "Plan Width": 89,
                      "Actual Startup Time": 0.018,
                      "Actual Total Time": 0.022,
                      "Actual Rows": 3,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94\".id", "NULL::bigint", "\"218c68c7a94\".zustand_id", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 1.12,
                          "Total Cost": 1.13,
                          "Plan Rows": 2,
                          "Plan Width": 80,
                          "Actual Startup Time": 0.013,
                          "Actual Total Time": 0.015,
                          "Actual Rows": 3,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94_1\".id", "NULL::bigint", "\"218c68c7a94_1\".zustand_id"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 1.12,
                              "Total Cost": 1.13,
                              "Plan Rows": 2,
                              "Plan Width": 80,
                              "Actual Startup Time": 0.012,
                              "Actual Total Time": 0.014,
                              "Actual Rows": 3,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94_1\".id", "NULL::bigint", "\"218c68c7a94_1\".zustand_id"],
                              "Sort Key": ["\"218c68c7a94_1\".zustand_id NULLS FIRST", "\"218c68c7a94_1\".id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 1,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_werkstoffzustaende",
                                  "Schema": "public",
                                  "Alias": "218c68c7a94_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.11,
                                  "Plan Rows": 2,
                                  "Plan Width": 80,
                                  "Actual Startup Time": 0.007,
                                  "Actual Total Time": 0.008,
                                  "Actual Rows": 3,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"218c68c7a94_1\".id", "NULL::bigint", "\"218c68c7a94_1\".zustand_id"],
                                  "Filter": "(\"218c68c7a94_1\".wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 6,
                                  "Shared Hit Blocks": 1,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.001,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_3",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.002,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.000,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Node Type": "Limit",
              "Parent Relationship": "SubPlan",
              "Subplan Name": "SubPlan 14",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 0.00,
              "Total Cost": 11.79,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.078,
              "Actual Total Time": 0.081,
              "Actual Rows": 1,
              "Actual Loops": 3,
              "Output": ["(jsonb_build_object('id', (\"6a2aa95c3b6\".id)::text, 'werkstoffSpezifikation', (SubPlan 10), 'zustaende', (SubPlan 11), 'werkstoff', (SubPlan 12), 'status', (SubPlan 13), '__typename', 'CustZustand'))"],
              "Shared Hit Blocks": 23,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Seq Scan",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Relation Name": "cust_zustand",
                  "Schema": "public",
                  "Alias": "6a2aa95c3b6",
                  "Startup Cost": 0.00,
                  "Total Cost": 11.79,
                  "Plan Rows": 1,
                  "Plan Width": 32,
                  "Actual Startup Time": 0.076,
                  "Actual Total Time": 0.078,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "Output": ["jsonb_build_object('id', (\"6a2aa95c3b6\".id)::text, 'werkstoffSpezifikation', (SubPlan 10), 'zustaende', (SubPlan 11), 'werkstoff', (SubPlan 12), 'status', (SubPlan 13), '__typename', 'CustZustand')"],
                  "Filter": "(\"6a2aa95c3b6\".id = \"218c68c7a94\".zustand_id)",
                  "Rows Removed by Filter": 41,
                  "Shared Hit Blocks": 23,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Limit",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 10",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 0.00,
                      "Total Cost": 4.14,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.028,
                      "Actual Total Time": 0.029,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["(jsonb_build_object('werkstoff', (SubPlan 8), 'spezifikation', (SubPlan 9), '__typename', 'CustWerkstoffSpezifikation'))"],
                      "Shared Hit Blocks": 9,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Relation Name": "cust_werkstoff_spezifikation",
                          "Schema": "public",
                          "Alias": "8f996e8fdd8",
                          "Startup Cost": 0.00,
                          "Total Cost": 4.14,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.026,
                          "Actual Total Time": 0.027,
                          "Actual Rows": 1,
                          "Actual Loops": 3,
                          "Output": ["jsonb_build_object('werkstoff', (SubPlan 8), 'spezifikation', (SubPlan 9), '__typename', 'CustWerkstoffSpezifikation')"],
                          "Filter": "(\"8f996e8fdd8\".id = \"6a2aa95c3b6\".werkstoff_spezifikation_id)",
                          "Rows Removed by Filter": 3,
                          "Shared Hit Blocks": 9,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Limit",
                              "Parent Relationship": "SubPlan",
                              "Subplan Name": "SubPlan 8",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 0.00,
                              "Total Cost": 1.17,
                              "Plan Rows": 1,
                              "Plan Width": 32,
                              "Actual Startup Time": 0.007,
                              "Actual Total Time": 0.007,
                              "Actual Rows": 1,
                              "Actual Loops": 3,
                              "Output": ["(jsonb_build_object('label', \"49e6f91c990\".label, '__typename', 'CustWerkstoff'))"],
                              "Shared Hit Blocks": 3,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_werkstoff",
                                  "Schema": "public",
                                  "Alias": "49e6f91c990",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.17,
                                  "Plan Rows": 1,
                                  "Plan Width": 32,
                                  "Actual Startup Time": 0.006,
                                  "Actual Total Time": 0.006,
                                  "Actual Rows": 1,
                                  "Actual Loops": 3,
                                  "Output": ["jsonb_build_object('label', \"49e6f91c990\".label, '__typename', 'CustWerkstoff')"],
                                  "Filter": "(\"49e6f91c990\".id = \"8f996e8fdd8\".werkstoff_id)",
                                  "Rows Removed by Filter": 7,
                                  "Shared Hit Blocks": 3,
                                  "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": "Limit",
                              "Parent Relationship": "SubPlan",
                              "Subplan Name": "SubPlan 9",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 0.00,
                              "Total Cost": 1.56,
                              "Plan Rows": 1,
                              "Plan Width": 32,
                              "Actual Startup Time": 0.010,
                              "Actual Total Time": 0.010,
                              "Actual Rows": 1,
                              "Actual Loops": 3,
                              "Output": ["(jsonb_build_object('label', a689b46196c.label, '__typename', 'CustSpezifikation'))"],
                              "Shared Hit Blocks": 3,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_spezifikation",
                                  "Schema": "public",
                                  "Alias": "a689b46196c",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.56,
                                  "Plan Rows": 1,
                                  "Plan Width": 32,
                                  "Actual Startup Time": 0.009,
                                  "Actual Total Time": 0.009,
                                  "Actual Rows": 1,
                                  "Actual Loops": 3,
                                  "Output": ["jsonb_build_object('label', a689b46196c.label, '__typename', 'CustSpezifikation')"],
                                  "Filter": "(a689b46196c.id = \"8f996e8fdd8\".spezifikation_id)",
                                  "Rows Removed by Filter": 25,
                                  "Shared Hit Blocks": 3,
                                  "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": "Limit",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 11",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 0.00,
                      "Total Cost": 1.45,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.008,
                      "Actual Total Time": 0.009,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["(jsonb_build_object('label', \"0400872d09d\".label, '__typename', 'CustZustaende'))"],
                      "Shared Hit Blocks": 3,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Relation Name": "cust_zustaende",
                          "Schema": "public",
                          "Alias": "0400872d09d",
                          "Startup Cost": 0.00,
                          "Total Cost": 1.45,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.008,
                          "Actual Total Time": 0.008,
                          "Actual Rows": 1,
                          "Actual Loops": 3,
                          "Output": ["jsonb_build_object('label', \"0400872d09d\".label, '__typename', 'CustZustaende')"],
                          "Filter": "(\"0400872d09d\".id = \"6a2aa95c3b6\".zustaende_id)",
                          "Rows Removed by Filter": 18,
                          "Shared Hit Blocks": 3,
                          "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": "Limit",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 12",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 0.00,
                      "Total Cost": 1.17,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.007,
                      "Actual Total Time": 0.008,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["(jsonb_build_object('synonyms', bfdcdc00883.synonyms, '__typename', 'CustWerkstoff'))"],
                      "Shared Hit Blocks": 3,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Relation Name": "cust_werkstoff",
                          "Schema": "public",
                          "Alias": "bfdcdc00883",
                          "Startup Cost": 0.00,
                          "Total Cost": 1.17,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.007,
                          "Actual Total Time": 0.007,
                          "Actual Rows": 1,
                          "Actual Loops": 3,
                          "Output": ["jsonb_build_object('synonyms', bfdcdc00883.synonyms, '__typename', 'CustWerkstoff')"],
                          "Filter": "(bfdcdc00883.id = \"6a2aa95c3b6\".werkstoff_id)",
                          "Rows Removed by Filter": 5,
                          "Shared Hit Blocks": 3,
                          "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": "Limit",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 13",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 0.00,
                      "Total Cost": 1.04,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.008,
                      "Actual Total Time": 0.008,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["(jsonb_build_object('name', \"66ccd85f768\".name, 'colour', \"66ccd85f768\".colour, 'icon', \"66ccd85f768\".icon, '__typename', 'MetaStatuses'))"],
                      "Shared Hit Blocks": 3,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Seq Scan",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Relation Name": "meta_statuses",
                          "Schema": "public",
                          "Alias": "66ccd85f768",
                          "Startup Cost": 0.00,
                          "Total Cost": 1.04,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.007,
                          "Actual Total Time": 0.007,
                          "Actual Rows": 1,
                          "Actual Loops": 3,
                          "Output": ["jsonb_build_object('name', \"66ccd85f768\".name, 'colour', \"66ccd85f768\".colour, 'icon', \"66ccd85f768\".icon, '__typename', 'MetaStatuses')"],
                          "Filter": "(\"66ccd85f768\".id = \"6a2aa95c3b6\".status_id)",
                          "Rows Removed by Filter": 0,
                          "Shared Hit Blocks": 3,
                          "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 19",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 31.41,
          "Total Cost": 31.42,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 1.479,
          "Actual Total Time": 1.489,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchWerkstoffzustaendeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (\"61b4b5a5f27\".id)::text, 'zustand', (SubPlan 18), '__typename', 'CustWareneingangsbuchWerkstoffzustaende'), '__typename', 'CustWareneingangsbuchWerkstoffzustaendeEdge')), jsonb_build_array()))"],
          "Shared Hit Blocks": 28,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 1.12,
              "Total Cost": 1.22,
              "Plan Rows": 2,
              "Plan Width": 97,
              "Actual Startup Time": 0.025,
              "Actual Total Time": 0.040,
              "Actual Rows": 3,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27\".id", "NULL::bigint", "\"61b4b5a5f27\".zustand_id", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.12,
                  "Total Cost": 1.15,
                  "Plan Rows": 2,
                  "Plan Width": 89,
                  "Actual Startup Time": 0.018,
                  "Actual Total Time": 0.026,
                  "Actual Rows": 3,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27\".id", "NULL::bigint", "\"61b4b5a5f27\".zustand_id", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "61b4b5a5f27",
                      "Startup Cost": 1.12,
                      "Total Cost": 1.15,
                      "Plan Rows": 2,
                      "Plan Width": 89,
                      "Actual Startup Time": 0.017,
                      "Actual Total Time": 0.023,
                      "Actual Rows": 3,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27\".id", "NULL::bigint", "\"61b4b5a5f27\".zustand_id", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 1.12,
                          "Total Cost": 1.13,
                          "Plan Rows": 2,
                          "Plan Width": 80,
                          "Actual Startup Time": 0.015,
                          "Actual Total Time": 0.018,
                          "Actual Rows": 3,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27_1\".id", "NULL::bigint", "\"61b4b5a5f27_1\".zustand_id"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 1.12,
                              "Total Cost": 1.13,
                              "Plan Rows": 2,
                              "Plan Width": 80,
                              "Actual Startup Time": 0.015,
                              "Actual Total Time": 0.017,
                              "Actual Rows": 3,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27_1\".id", "NULL::bigint", "\"61b4b5a5f27_1\".zustand_id"],
                              "Sort Key": ["\"61b4b5a5f27_1\".id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 1,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_werkstoffzustaende",
                                  "Schema": "public",
                                  "Alias": "61b4b5a5f27_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.11,
                                  "Plan Rows": 2,
                                  "Plan Width": 80,
                                  "Actual Startup Time": 0.007,
                                  "Actual Total Time": 0.009,
                                  "Actual Rows": 3,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"61b4b5a5f27_1\".id", "NULL::bigint", "\"61b4b5a5f27_1\".zustand_id"],
                                  "Filter": "(\"61b4b5a5f27_1\".wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 6,
                                  "Shared Hit Blocks": 1,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.002,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_5",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.003,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.001,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Node Type": "Limit",
              "Parent Relationship": "SubPlan",
              "Subplan Name": "SubPlan 18",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 0.00,
              "Total Cost": 15.07,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.355,
              "Actual Total Time": 0.357,
              "Actual Rows": 1,
              "Actual Loops": 3,
              "Output": ["(jsonb_build_object('id', (\"589208c194e\".id)::text, 'zustand_me', (SubPlan 17), '__typename', 'CustZustand'))"],
              "Shared Hit Blocks": 27,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Seq Scan",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Relation Name": "cust_zustand",
                  "Schema": "public",
                  "Alias": "589208c194e",
                  "Startup Cost": 0.00,
                  "Total Cost": 15.07,
                  "Plan Rows": 1,
                  "Plan Width": 32,
                  "Actual Startup Time": 0.352,
                  "Actual Total Time": 0.354,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "Output": ["jsonb_build_object('id', (\"589208c194e\".id)::text, 'zustand_me', (SubPlan 17), '__typename', 'CustZustand')"],
                  "Filter": "(\"589208c194e\".id = \"61b4b5a5f27\".zustand_id)",
                  "Rows Removed by Filter": 41,
                  "Shared Hit Blocks": 27,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Aggregate",
                      "Strategy": "Plain",
                      "Partial Mode": "Simple",
                      "Parent Relationship": "SubPlan",
                      "Subplan Name": "SubPlan 17",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Startup Cost": 11.07,
                      "Total Cost": 11.09,
                      "Plan Rows": 1,
                      "Plan Width": 32,
                      "Actual Startup Time": 0.310,
                      "Actual Total Time": 0.311,
                      "Actual Rows": 1,
                      "Actual Loops": 3,
                      "Output": ["jsonb_build_object('__typename', 'CustZustandMeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (\"35d8eb723c3\".id)::text, 'min', \"35d8eb723c3\".min, 'max', \"35d8eb723c3\".max, 'mechanische_eigenschaften', (SubPlan 16), '__typename', 'CustZustandMe'), '__typename', 'CustZustandMeEdge')), jsonb_build_array()))"],
                      "Shared Hit Blocks": 22,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Nested Loop",
                          "Parent Relationship": "Outer",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Join Type": "Inner",
                          "Startup Cost": 6.29,
                          "Total Cost": 6.45,
                          "Plan Rows": 4,
                          "Plan Width": 103,
                          "Actual Startup Time": 0.088,
                          "Actual Total Time": 0.103,
                          "Actual Rows": 4,
                          "Actual Loops": 3,
                          "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3\".max", "\"35d8eb723c3\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3\".id", "\"35d8eb723c3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
                          "Inner Unique": false,
                          "Shared Hit Blocks": 9,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Limit",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 6.29,
                              "Total Cost": 6.34,
                              "Plan Rows": 4,
                              "Plan Width": 95,
                              "Actual Startup Time": 0.085,
                              "Actual Total Time": 0.092,
                              "Actual Rows": 4,
                              "Actual Loops": 3,
                              "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3\".max", "\"35d8eb723c3\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3\".id", "\"35d8eb723c3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                              "Shared Hit Blocks": 9,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Subquery Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Alias": "35d8eb723c3",
                                  "Startup Cost": 6.29,
                                  "Total Cost": 6.34,
                                  "Plan Rows": 4,
                                  "Plan Width": 95,
                                  "Actual Startup Time": 0.084,
                                  "Actual Total Time": 0.090,
                                  "Actual Rows": 4,
                                  "Actual Loops": 3,
                                  "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3\".max", "\"35d8eb723c3\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3\".id", "\"35d8eb723c3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                                  "Shared Hit Blocks": 9,
                                  "Shared Read Blocks": 0,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "Plans": [
                                    {
                                      "Node Type": "Limit",
                                      "Parent Relationship": "Subquery",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 6.29,
                                      "Total Cost": 6.30,
                                      "Plan Rows": 4,
                                      "Plan Width": 86,
                                      "Actual Startup Time": 0.082,
                                      "Actual Total Time": 0.084,
                                      "Actual Rows": 4,
                                      "Actual Loops": 3,
                                      "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3_1\".max", "\"35d8eb723c3_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3_1\".id", "\"35d8eb723c3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                                      "Shared Hit Blocks": 9,
                                      "Shared Read Blocks": 0,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0,
                                      "Plans": [
                                        {
                                          "Node Type": "Sort",
                                          "Parent Relationship": "Outer",
                                          "Parallel Aware": false,
                                          "Async Capable": false,
                                          "Startup Cost": 6.29,
                                          "Total Cost": 6.30,
                                          "Plan Rows": 4,
                                          "Plan Width": 86,
                                          "Actual Startup Time": 0.080,
                                          "Actual Total Time": 0.082,
                                          "Actual Rows": 4,
                                          "Actual Loops": 3,
                                          "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3_1\".max", "\"35d8eb723c3_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3_1\".id", "\"35d8eb723c3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                                          "Sort Key": ["\"35d8eb723c3_1\".id"],
                                          "Sort Method": "quicksort",
                                          "Sort Space Used": 25,
                                          "Sort Space Type": "Memory",
                                          "Shared Hit Blocks": 9,
                                          "Shared Read Blocks": 0,
                                          "Shared Dirtied Blocks": 0,
                                          "Shared Written Blocks": 0,
                                          "Local Hit Blocks": 0,
                                          "Local Read Blocks": 0,
                                          "Local Dirtied Blocks": 0,
                                          "Local Written Blocks": 0,
                                          "Temp Read Blocks": 0,
                                          "Temp Written Blocks": 0,
                                          "Plans": [
                                            {
                                              "Node Type": "Seq Scan",
                                              "Parent Relationship": "Outer",
                                              "Parallel Aware": false,
                                              "Async Capable": false,
                                              "Relation Name": "cust_zustand_me",
                                              "Schema": "public",
                                              "Alias": "35d8eb723c3_1",
                                              "Startup Cost": 0.00,
                                              "Total Cost": 6.25,
                                              "Plan Rows": 4,
                                              "Plan Width": 86,
                                              "Actual Startup Time": 0.030,
                                              "Actual Total Time": 0.072,
                                              "Actual Rows": 4,
                                              "Actual Loops": 3,
                                              "Output": ["NULL::text", "NULL::bigint", "\"35d8eb723c3_1\".max", "\"35d8eb723c3_1\".min", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"35d8eb723c3_1\".id", "\"35d8eb723c3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                                              "Filter": "(\"35d8eb723c3_1\".zustand_id = \"589208c194e\".id)",
                                              "Rows Removed by Filter": 256,
                                              "Shared Hit Blocks": 9,
                                              "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": "Materialize",
                              "Parent Relationship": "Inner",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 0.00,
                              "Total Cost": 0.03,
                              "Plan Rows": 1,
                              "Plan Width": 0,
                              "Actual Startup Time": 0.000,
                              "Actual Total Time": 0.001,
                              "Actual Rows": 1,
                              "Actual Loops": 13,
                              "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,
                              "Plans": [
                                {
                                  "Node Type": "Subquery Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Alias": "xyz_tot_4",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 0.02,
                                  "Plan Rows": 1,
                                  "Plan Width": 0,
                                  "Actual Startup Time": 0.001,
                                  "Actual Total Time": 0.002,
                                  "Actual Rows": 1,
                                  "Actual Loops": 1,
                                  "Shared Hit Blocks": 0,
                                  "Shared Read Blocks": 0,
                                  "Shared Dirtied Blocks": 0,
                                  "Shared Written Blocks": 0,
                                  "Local Hit Blocks": 0,
                                  "Local Read Blocks": 0,
                                  "Local Dirtied Blocks": 0,
                                  "Local Written Blocks": 0,
                                  "Temp Read Blocks": 0,
                                  "Temp Written Blocks": 0,
                                  "Plans": [
                                    {
                                      "Node Type": "Result",
                                      "Parent Relationship": "Subquery",
                                      "Parallel Aware": false,
                                      "Async Capable": false,
                                      "Startup Cost": 0.00,
                                      "Total Cost": 0.01,
                                      "Plan Rows": 1,
                                      "Plan Width": 8,
                                      "Actual Startup Time": 0.001,
                                      "Actual Total Time": 0.001,
                                      "Actual Rows": 1,
                                      "Actual Loops": 1,
                                      "Output": ["NULL::bigint"],
                                      "Shared Hit Blocks": 0,
                                      "Shared Read Blocks": 0,
                                      "Shared Dirtied Blocks": 0,
                                      "Shared Written Blocks": 0,
                                      "Local Hit Blocks": 0,
                                      "Local Read Blocks": 0,
                                      "Local Dirtied Blocks": 0,
                                      "Local Written Blocks": 0,
                                      "Temp Read Blocks": 0,
                                      "Temp Written Blocks": 0
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "SubPlan",
                          "Subplan Name": "SubPlan 16",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 1.13,
                          "Plan Rows": 1,
                          "Plan Width": 32,
                          "Actual Startup Time": 0.012,
                          "Actual Total Time": 0.012,
                          "Actual Rows": 1,
                          "Actual Loops": 13,
                          "Output": ["(jsonb_build_object('id', (b2f9611a598.id)::text, 'symbol', b2f9611a598.symbol, '__typename', 'CustMechanischeEigenschaften'))"],
                          "Shared Hit Blocks": 13,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Seq Scan",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Relation Name": "cust_mechanische_eigenschaften",
                              "Schema": "public",
                              "Alias": "b2f9611a598",
                              "Startup Cost": 0.00,
                              "Total Cost": 1.13,
                              "Plan Rows": 1,
                              "Plan Width": 32,
                              "Actual Startup Time": 0.010,
                              "Actual Total Time": 0.010,
                              "Actual Rows": 1,
                              "Actual Loops": 13,
                              "Output": ["jsonb_build_object('id', (b2f9611a598.id)::text, 'symbol', b2f9611a598.symbol, '__typename', 'CustMechanischeEigenschaften')"],
                              "Filter": "(b2f9611a598.id = \"35d8eb723c3\".mechanische_eigenschaften_id)",
                              "Rows Removed by Filter": 5,
                              "Shared Hit Blocks": 13,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "Node Type": "Aggregate",
          "Strategy": "Plain",
          "Partial Mode": "Simple",
          "Parent Relationship": "SubPlan",
          "Subplan Name": "SubPlan 20",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 1.46,
          "Total Cost": 1.47,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.104,
          "Actual Total Time": 0.108,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchMeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('value', \"3da39db29f3\".value, 'mechanischeEigenschaftenId', (\"3da39db29f3\".mechanische_eigenschaften_id)::text, '__typename', 'CustWareneingangsbuchMe'), '__typename', 'CustWareneingangsbuchMeEdge')), jsonb_build_array()))"],
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 1.26,
              "Total Cost": 1.39,
              "Plan Rows": 3,
              "Plan Width": 105,
              "Actual Startup Time": 0.039,
              "Actual Total Time": 0.049,
              "Actual Rows": 2,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3\".id", "\"3da39db29f3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.26,
                  "Total Cost": 1.30,
                  "Plan Rows": 3,
                  "Plan Width": 97,
                  "Actual Startup Time": 0.031,
                  "Actual Total Time": 0.036,
                  "Actual Rows": 2,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3\".id", "\"3da39db29f3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "3da39db29f3",
                      "Startup Cost": 1.26,
                      "Total Cost": 1.30,
                      "Plan Rows": 3,
                      "Plan Width": 97,
                      "Actual Startup Time": 0.030,
                      "Actual Total Time": 0.034,
                      "Actual Rows": 2,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3\".id", "\"3da39db29f3\".mechanische_eigenschaften_id", "NULL::bigint", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 1.26,
                          "Total Cost": 1.27,
                          "Plan Rows": 3,
                          "Plan Width": 88,
                          "Actual Startup Time": 0.027,
                          "Actual Total Time": 0.029,
                          "Actual Rows": 2,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3_1\".id", "\"3da39db29f3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 1.26,
                              "Total Cost": 1.27,
                              "Plan Rows": 3,
                              "Plan Width": 88,
                              "Actual Startup Time": 0.026,
                              "Actual Total Time": 0.028,
                              "Actual Rows": 2,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3_1\".id", "\"3da39db29f3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                              "Sort Key": ["\"3da39db29f3_1\".id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 1,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_me",
                                  "Schema": "public",
                                  "Alias": "3da39db29f3_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.24,
                                  "Plan Rows": 3,
                                  "Plan Width": 88,
                                  "Actual Startup Time": 0.016,
                                  "Actual Total Time": 0.018,
                                  "Actual Rows": 2,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "\"3da39db29f3_1\".value", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "\"3da39db29f3_1\".id", "\"3da39db29f3_1\".mechanische_eigenschaften_id", "NULL::bigint"],
                                  "Filter": "(\"3da39db29f3_1\".wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 17,
                                  "Shared Hit Blocks": 1,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.002,
                  "Actual Total Time": 0.003,
                  "Actual Rows": 1,
                  "Actual Loops": 2,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_6",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.003,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.001,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "Node Type": "Limit",
          "Parent Relationship": "SubPlan",
          "Subplan Name": "SubPlan 21",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 0.00,
          "Total Cost": 1.05,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.016,
          "Actual Total Time": 0.017,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["(jsonb_build_object('id', (ba2be776fc9.id)::text, 'label', ba2be776fc9.label, '__typename', 'CustGeprGgSpec'))"],
          "Shared Hit Blocks": 1,
          "Shared Read Blocks": 0,
          "Shared Dirtied Blocks": 0,
          "Shared Written Blocks": 0,
          "Local Hit Blocks": 0,
          "Local Read Blocks": 0,
          "Local Dirtied Blocks": 0,
          "Local Written Blocks": 0,
          "Temp Read Blocks": 0,
          "Temp Written Blocks": 0,
          "Plans": [
            {
              "Node Type": "Seq Scan",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Relation Name": "cust_gepr_gg_spec",
              "Schema": "public",
              "Alias": "ba2be776fc9",
              "Startup Cost": 0.00,
              "Total Cost": 1.05,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.016,
              "Actual Total Time": 0.016,
              "Actual Rows": 1,
              "Actual Loops": 1,
              "Output": ["jsonb_build_object('id', (ba2be776fc9.id)::text, 'label', ba2be776fc9.label, '__typename', 'CustGeprGgSpec')"],
              "Filter": "(ba2be776fc9.id = efeb40767e2.gepr_gg_spec_id)",
              "Rows Removed by Filter": 1,
              "Shared Hit Blocks": 1,
              "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 23",
          "Parallel Aware": false,
          "Async Capable": false,
          "Startup Cost": 4.51,
          "Total Cost": 4.52,
          "Plan Rows": 1,
          "Plan Width": 32,
          "Actual Startup Time": 0.171,
          "Actual Total Time": 0.176,
          "Actual Rows": 1,
          "Actual Loops": 1,
          "Output": ["jsonb_build_object('__typename', 'CustWareneingangsbuchWerkstoffprufungeConnection', 'edges', COALESCE(jsonb_agg(jsonb_build_object('node', jsonb_build_object('id', (fdac1d83eb2.id)::text, 'pivotLabel', (SubPlan 22), '__typename', 'CustWareneingangsbuchWerkstoffprufunge'), '__typename', 'CustWareneingangsbuchWerkstoffprufungeEdge')), jsonb_build_array()))"],
          "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,
          "Plans": [
            {
              "Node Type": "Nested Loop",
              "Parent Relationship": "Outer",
              "Parallel Aware": false,
              "Async Capable": false,
              "Join Type": "Inner",
              "Startup Cost": 1.10,
              "Total Cost": 1.23,
              "Plan Rows": 3,
              "Plan Width": 97,
              "Actual Startup Time": 0.029,
              "Actual Total Time": 0.041,
              "Actual Rows": 3,
              "Actual Loops": 1,
              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2.id", "NULL::bigint", "fdac1d83eb2.werkstoffprufunge_id", "NULL::boolean", "NULL::bigint", "NULL::bigint"],
              "Inner Unique": false,
              "Shared Hit Blocks": 1,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Limit",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 1.10,
                  "Total Cost": 1.14,
                  "Plan Rows": 3,
                  "Plan Width": 89,
                  "Actual Startup Time": 0.022,
                  "Actual Total Time": 0.029,
                  "Actual Rows": 3,
                  "Actual Loops": 1,
                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2.id", "NULL::bigint", "fdac1d83eb2.werkstoffprufunge_id", "NULL::boolean", "NULL::bigint"],
                  "Shared Hit Blocks": 1,
                  "Shared Read Blocks": 0,
                  "Shared Dirtied Blocks": 0,
                  "Shared Written Blocks": 0,
                  "Local Hit Blocks": 0,
                  "Local Read Blocks": 0,
                  "Local Dirtied Blocks": 0,
                  "Local Written Blocks": 0,
                  "Temp Read Blocks": 0,
                  "Temp Written Blocks": 0,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "fdac1d83eb2",
                      "Startup Cost": 1.10,
                      "Total Cost": 1.14,
                      "Plan Rows": 3,
                      "Plan Width": 89,
                      "Actual Startup Time": 0.021,
                      "Actual Total Time": 0.027,
                      "Actual Rows": 3,
                      "Actual Loops": 1,
                      "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2.id", "NULL::bigint", "fdac1d83eb2.werkstoffprufunge_id", "NULL::boolean", "NULL::bigint"],
                      "Shared Hit Blocks": 1,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Limit",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 1.10,
                          "Total Cost": 1.11,
                          "Plan Rows": 3,
                          "Plan Width": 80,
                          "Actual Startup Time": 0.019,
                          "Actual Total Time": 0.021,
                          "Actual Rows": 3,
                          "Actual Loops": 1,
                          "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2_1.id", "NULL::bigint", "fdac1d83eb2_1.werkstoffprufunge_id"],
                          "Shared Hit Blocks": 1,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0,
                          "Plans": [
                            {
                              "Node Type": "Sort",
                              "Parent Relationship": "Outer",
                              "Parallel Aware": false,
                              "Async Capable": false,
                              "Startup Cost": 1.10,
                              "Total Cost": 1.11,
                              "Plan Rows": 3,
                              "Plan Width": 80,
                              "Actual Startup Time": 0.018,
                              "Actual Total Time": 0.019,
                              "Actual Rows": 3,
                              "Actual Loops": 1,
                              "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2_1.id", "NULL::bigint", "fdac1d83eb2_1.werkstoffprufunge_id"],
                              "Sort Key": ["fdac1d83eb2_1.werkstoffprufunge_id NULLS FIRST", "fdac1d83eb2_1.id"],
                              "Sort Method": "quicksort",
                              "Sort Space Used": 25,
                              "Sort Space Type": "Memory",
                              "Shared Hit Blocks": 1,
                              "Shared Read Blocks": 0,
                              "Shared Dirtied Blocks": 0,
                              "Shared Written Blocks": 0,
                              "Local Hit Blocks": 0,
                              "Local Read Blocks": 0,
                              "Local Dirtied Blocks": 0,
                              "Local Written Blocks": 0,
                              "Temp Read Blocks": 0,
                              "Temp Written Blocks": 0,
                              "Plans": [
                                {
                                  "Node Type": "Seq Scan",
                                  "Parent Relationship": "Outer",
                                  "Parallel Aware": false,
                                  "Async Capable": false,
                                  "Relation Name": "cust_wareneingangsbuch_werkstoffprufunge",
                                  "Schema": "public",
                                  "Alias": "fdac1d83eb2_1",
                                  "Startup Cost": 0.00,
                                  "Total Cost": 1.07,
                                  "Plan Rows": 3,
                                  "Plan Width": 80,
                                  "Actual Startup Time": 0.008,
                                  "Actual Total Time": 0.010,
                                  "Actual Rows": 3,
                                  "Actual Loops": 1,
                                  "Output": ["NULL::text", "NULL::bigint", "NULL::timestamp with time zone", "NULL::timestamp with time zone", "fdac1d83eb2_1.id", "NULL::bigint", "fdac1d83eb2_1.werkstoffprufunge_id"],
                                  "Filter": "(fdac1d83eb2_1.wareneingangsbuch_id = efeb40767e2.id)",
                                  "Rows Removed by Filter": 3,
                                  "Shared Hit Blocks": 1,
                                  "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": "Materialize",
                  "Parent Relationship": "Inner",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Startup Cost": 0.00,
                  "Total Cost": 0.03,
                  "Plan Rows": 1,
                  "Plan Width": 0,
                  "Actual Startup Time": 0.001,
                  "Actual Total Time": 0.002,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "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,
                  "Plans": [
                    {
                      "Node Type": "Subquery Scan",
                      "Parent Relationship": "Outer",
                      "Parallel Aware": false,
                      "Async Capable": false,
                      "Alias": "xyz_tot_7",
                      "Startup Cost": 0.00,
                      "Total Cost": 0.02,
                      "Plan Rows": 1,
                      "Plan Width": 0,
                      "Actual Startup Time": 0.001,
                      "Actual Total Time": 0.002,
                      "Actual Rows": 1,
                      "Actual Loops": 1,
                      "Shared Hit Blocks": 0,
                      "Shared Read Blocks": 0,
                      "Shared Dirtied Blocks": 0,
                      "Shared Written Blocks": 0,
                      "Local Hit Blocks": 0,
                      "Local Read Blocks": 0,
                      "Local Dirtied Blocks": 0,
                      "Local Written Blocks": 0,
                      "Temp Read Blocks": 0,
                      "Temp Written Blocks": 0,
                      "Plans": [
                        {
                          "Node Type": "Result",
                          "Parent Relationship": "Subquery",
                          "Parallel Aware": false,
                          "Async Capable": false,
                          "Startup Cost": 0.00,
                          "Total Cost": 0.01,
                          "Plan Rows": 1,
                          "Plan Width": 8,
                          "Actual Startup Time": 0.000,
                          "Actual Total Time": 0.001,
                          "Actual Rows": 1,
                          "Actual Loops": 1,
                          "Output": ["NULL::bigint"],
                          "Shared Hit Blocks": 0,
                          "Shared Read Blocks": 0,
                          "Shared Dirtied Blocks": 0,
                          "Shared Written Blocks": 0,
                          "Local Hit Blocks": 0,
                          "Local Read Blocks": 0,
                          "Local Dirtied Blocks": 0,
                          "Local Written Blocks": 0,
                          "Temp Read Blocks": 0,
                          "Temp Written Blocks": 0
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "Node Type": "Limit",
              "Parent Relationship": "SubPlan",
              "Subplan Name": "SubPlan 22",
              "Parallel Aware": false,
              "Async Capable": false,
              "Startup Cost": 0.00,
              "Total Cost": 1.07,
              "Plan Rows": 1,
              "Plan Width": 32,
              "Actual Startup Time": 0.014,
              "Actual Total Time": 0.014,
              "Actual Rows": 1,
              "Actual Loops": 3,
              "Output": ["(jsonb_build_object('id', (f28886444ea.id)::text, 'label', f28886444ea.label, '__typename', 'CustWerkstoffprufunge'))"],
              "Shared Hit Blocks": 3,
              "Shared Read Blocks": 0,
              "Shared Dirtied Blocks": 0,
              "Shared Written Blocks": 0,
              "Local Hit Blocks": 0,
              "Local Read Blocks": 0,
              "Local Dirtied Blocks": 0,
              "Local Written Blocks": 0,
              "Temp Read Blocks": 0,
              "Temp Written Blocks": 0,
              "Plans": [
                {
                  "Node Type": "Seq Scan",
                  "Parent Relationship": "Outer",
                  "Parallel Aware": false,
                  "Async Capable": false,
                  "Relation Name": "cust_werkstoffprufunge",
                  "Schema": "public",
                  "Alias": "f28886444ea",
                  "Startup Cost": 0.00,
                  "Total Cost": 1.07,
                  "Plan Rows": 1,
                  "Plan Width": 32,
                  "Actual Startup Time": 0.012,
                  "Actual Total Time": 0.012,
                  "Actual Rows": 1,
                  "Actual Loops": 3,
                  "Output": ["jsonb_build_object('id', (f28886444ea.id)::text, 'label', f28886444ea.label, '__typename', 'CustWerkstoffprufunge')"],
                  "Filter": "(f28886444ea.id = fdac1d83eb2.werkstoffprufunge_id)",
                  "Rows Removed by Filter": 2,
                  "Shared Hit Blocks": 3,
                  "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
                }
              ]
            }
          ]
        }
      ]
    },
    "Query Identifier": -2621766589780044217,
    "Planning": {
      "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
    },
    "Planning Time": 0.075,
    "Triggers": [
    ],
    "Execution Time": 6.765
  }
]

Flambe avatar Jun 14 '22 15:06 Flambe

I presume that removing parts like true = true actually does nothing as it's likely already optimised out

that's correct. Scalar statements are either completely removed or executed exactly once

then immediately run the GQL query, the GQL query still takes a few seconds to return

do you mean executing the GQL query via SQL or through the API? If you meant through the API, please try to reproduce the behavior using the SQL function graphql.resolve. That will let us know if the response is being slowed down by something in the database


How large is the JSON response in KB?

olirice avatar Jun 14 '22 17:06 olirice

do you mean executing the GQL query via SQL or through the API?

I was using SQL but not graphql.resolve. I just tried with graphql.resolve and it took 1.2s on the first run.

How large is the JSON response in KB?

~17KB (regardless of if I'm querying with graphql.resolve or executing the prepared statement directly)

Flambe avatar Jun 14 '22 19:06 Flambe

hmm! unfortunately I haven't been able to reproduce that behavior

The transpile step on your query wouldn't account account for more than a few milliseconds in the worst case so the execution times shouldn't be impacted

The issue seems like a resource constraint. Do you have access to a more powerful machine to see if the behavior continues? If you're running using docker (particularly docker for mac) via the CLI, docker could be artificially restricting th resources available to each container.

Alternatively if you can reproduce it on a supabase free-tier instance I can assist with debugging more directly

olirice avatar Jun 14 '22 20:06 olirice

hmm! unfortunately I haven't been able to reproduce that behavior

The transpile step on your query wouldn't account account for more than a few milliseconds in the worst case so the execution times shouldn't be impacted

I did make an attempt to make a reproducible case, but I was difficult without knowing where the exact issue is which is why I made the issue as is.

Ah ok, so that rules out my theory then.

The issue seems like a resource constraint. Do you have access to a more powerful machine to see if the behavior continues? If you're running using docker (particularly docker for mac) via the CLI, docker could be artificially restricting th resources available to each container.

Alternatively if you can reproduce it on a supabase free-tier instance I can assist with debugging more directly

I am running it via the CLI with docker, but on Linux. We can definitely look into running this on a more powerful dedicated machine to see if the issue still crops up.

Yup this is reproducible on the free tier: odiercujmpgqtfqwjhub. I've just used our app to hit a few of the slow requests and it's unlikely that anyone else will hit it in the next few hours as this is our test project and it's getting quite late here. Is there any more information you need related to the project, or is the id enough?

Flambe avatar Jun 14 '22 20:06 Flambe

Do you have access to a more powerful machine to see if the behavior continues?

We set up a dedicated server (Ubuntu 20.04) for Postgres (12 as that was in the apt repo) today to try this out and I've installed the extension based on your instructions. Unfortunately I have been unable to get it working with our data (exported from my local which is where I've been testing from) without the extension erroring.

I've tried:

  • Installing the extension first, importing the data, then running graphql.rebuild_schema()
  • Importing the data first, then installing the extension
  • Reverting to v.0.2.0 of the extension (as this appears to be what I'm running locally) and trying the above

All of these threw this error which appears to be coming from the extension. Have I missed something in the install?

SQL Error [42P13]: ERROR: return type mismatch in function declared to return text
  Detail: Actual return type is name.
  Where: SQL function "to_function_name" during startup
SQL statement "insert into graphql._field(meta_kind, entity, parent_type_id, type_id, is_not_null, is_array, is_array_not_null, description, is_hidden_from_schema, func)
        select
            'Function' as meta_kind,
            gt.entity,
            gt.id parent_type_id,
            graphql.type_id(pp.prorettype::regtype) as type_id,
            false as is_not_null,
            graphql.is_array(pp.prorettype::regtype) as is_array,
            false as is_array_not_null,
            null::text description,
            false as is_hidden_from_schema,
            pp.oid::regproc as func
        from
            graphql.type gt
            join pg_class pc
                on gt.entity = pc.oid
            join pg_proc pp
                on pp.proargtypes[0] = pc.reltype
        where
            gt.meta_kind = 'Node'
            and pronargs = 1
            -- starts with underscore
            and graphql.to_function_name(pp.oid::regproc) like '\_%'"
PL/pgSQL function graphql.rebuild_fields() line 163 at SQL statement
SQL statement "SELECT graphql.rebuild_fields()"
PL/pgSQL function graphql.rebuild_schema() line 10 at PERFORM

Flambe avatar Jun 15 '22 12:06 Flambe

Yup this is reproducible on the free tier: odiercuj.........

thank you, that's prefect. I am able to reproduce the issue and am working towards isolating the source of the slow initial query. I'll update you as soon as I know more

We set up a dedicated server (Ubuntu 20.04) for Postgres (12 as that was in the apt repo)

thanks for making that effort. I have everything needed to debug from the free tier instance now. The install issue is happening because pg_graphql is a postgres 14+ extension

olirice avatar Jun 15 '22 14:06 olirice

That's great to hear! Hopefully you have more luck than me at finding it.

If you need anything else from me I'll be happy to help!

The install issue is happening because pg_graphql is a postgres 14+ extension

Ahh that makes sense, I should have tried upgrading before coming here seeing as everything else Supabase is using postgres 14.

Flambe avatar Jun 15 '22 15:06 Flambe

We looked into setting up a more powerful dedicated server for postgres again (with some minor pg tuning) as a way to temporarily avoid this issue. One of the queries went from an initial load of ~3s to ~600ms which is definitely good progress, but still 5-10x slower than the raw query.

Have you managed to find out anything more about the source of the issue?

I've also been looking at some best practices for GQL (at least from Apollo), some of which mention using smaller, more reusable queries/splitting reused parts into fragements. I haven't been able to try this out yet due to other priorities, but could this be another potential path to improving performance?

Flambe avatar Jun 22 '22 12:06 Flambe

Sorry for the delay. I recreated your query locally and am similarly getting 500-600 ms.

The transpile step on your query wouldn't account account for more than a few milliseconds

I was wrong about this, the source is the initially slow query is the transpiler. We had not previously tested queries of that size (25 joins) and it is hidden by high performance development machines and caching. Unfortunately, there is no single source of the slow initial query. On free-tier machines each clause of the query builder costs a couple milliseconds * 25 calls adds up quick!

Some work has started on optimizations. So far that can shave out 8-10% of transpile time. I'm confident that there is enough low hanging fruit to get a several X improvement but it will be lots of little tweaks that will take time to release so that won't be immediately helpful to you.

some of which mention using smaller, more reusable queries/splitting reused parts into fragments

Splitting queries into multiple smaller chunks will have the greatest impact. Performance of fragments is actually slightly slower than defining fields inline so that will not help in this case.

In the short term, the easiest options are

  • running on a more powerful DB server (as you saw)
  • splitting the queries up into smaller chunks
  • (untested) pre-warming the cache if queries are known in advance

I will keep you in the loop on this thread as performance optimizations land

olirice avatar Jun 22 '22 14:06 olirice

No problem. Thank you for the explanation and potential short-term solutions!

I believe that the best short/long-term solution for us will be to split up these queries so we have consistency across local/SaaS/self hosted Supabase. It'll also give us more flexibility with how we decide to render the data in the UI so that could be another advantage. I will avoid fragments though in this use case.

I look forward to seeing more progress in this library :)

Flambe avatar Jun 22 '22 15:06 Flambe