Improvements to OmniLight3D's shadows

Work in progress based on #51025.
Here's a quick comparison using the default bias values:
Before, current master:
https://user-images.githubusercontent.com/4402304/128563046-5bcdf91e-a11f-45a1-b37d-f07e4a1f2310.mp4
After:
https://user-images.githubusercontent.com/4402304/128563051-614a6dfd-e552-4e70-bfcc-06a5177afe32.mp4
Fixed issues
Lack of precision in cube map mode
Cubemap shadows were using 0.01 as znear regardless of the light radius (zfar), so for large lights precision would go drastically down. I changed it so znear scales relative to the light's radius (0.005*radius) and acne cause by precision issues was gone. This means large lights can't be placed too close to shadow casters (i.e 0.5 meters for a 100 radius light) but dual paraboloid mode doesn't have this restriction, so users can go with that if needed. A probably better fix would be to use logarithmic depth or reverse Z buffer in order to keep a constant znear and still distribute precision evenly over the shadow map, but it can be done in a separate PR.
Squashed paraboloids
In order to fit both paraboloids on a single atlas square we were stacking them up in Y, resulting in two squashed 2:1 ratio paraboloids. This created aliasing and consequently acne in the shadows. I tried scaling the bias amount in the Y axis to compensate for that, but it didn't seem to work. The only solution I found was to use two square atlas regions, one for each paraboloid. The current fix shows that using two square regions instead of two half squares gets rid of the aliasing, but it's not ready to be merged yet. Omni lights make use of two quadrants but only one is marked as used, so there are overlaps if there are multiple lights.
Shadowmap atlas bleeding
Since shadow atlas regions are adjacent to each other, and we use bilinear sampling, there's bleeding across them. I noticed this because sampling one paraboloid was picking data from the other. I added 1px padding to omni lights, but I think this will also be a problem for other light types, it needs to be looked into.
Shadow blur issues
Shadow blur had a couple of issues. The sampling radius was constant while the paraboloids have more pixel density near the Z axis, so it resulted in an inconsistent blurring size depending on the light's orientation. This was easy to fix by scaling the sampling radius according to the Z coordinates of the shadow ray. The other issue appeared because blur samples were not clamped inside the two circles that form the paraboloid, so with a large blur radius samples ended up outside the paraboloid regions and picked up invalid data. I added some code to detect such cases and move the sample point to the other paraboloid, and the issue is gone.
Biasing tweaks
With all the above issues fixed, I was able to tweak both regular bias and normal bias. I made sure they worked independently of the light's radius, and so far I haven't found any cases where I needed to change the default values.
Remaining issues
Direct paraboloid mode
The acne issues weren't as severe in this mode, and some of the fixes I did also apply, but I didn't attempt to fix the artifacts that appear near the OmniLight's local Z plane, where the two paraboloids meet. There's also a lot of distortion in meshes that have long edges without subdivisions, but that's inherent to the way we render the paraboloids. That means this mode will be left as a faster but less accurate mode, it can be made to work in many situations, but it needs care when choosing the light's orientation and properly subdivided geometry.
Soft shadow darkening
This is a general issue for all light types. Increasing the radius of soft shadows (or shadow blur) results in a general darkening of the light. This happens because we take samples in a radius around the shaded surface point but then compare them all to the same depth, so samples that fall between the light and the shaded point are treated as shadowed even if they are not. In order to fix that, we should adjust the threshold depth of each sample. We can probably assume the surface to be flat, get the global position for each sample and recompute the depth threshold from there, but I haven't really tested it.

This happens because we take samples in a radius around the shaded surface point but then compare them all to the same depth, so samples that fall between the light and the shaded point are treated as shadowed even if they are not. In order to fix that, we should adjust the threshold depth of each sample. We can probably assume the surface to be flat, get the global position for each sample and recompute the depth threshold from there, but I haven't really tested it.

I read an interesting slide show recently that discussed this in the context of sampling for SSAO. I'll dig it up and see if it will be helpful. From what I remember, they found that the flat surface assumption led to bad acne in certain situations. They came up with a more clever approach.

Current Artifact of this PR (v4.0.dev.custom_build [e456c1c45])has an issue with both The Mobile and Clustered Renderer when Soft Shadows are set to Hard in Project Settings for Omni Lights

Bug.zip

@mrjustaguy you are most likely seeing what I mention in the PR description:

I changed it so znear scales relative to the light's radius (0.005*radius) and acne caused by precision issues was gone. This means large lights can't be placed too close to shadow casters (i.e 0.5 meters for a 100 radius light) but dual paraboloid mode doesn't have this restriction, so users can go with that if needed.

In your case, a radius of 500 means anything closer than 2.5 units won't cast any shadows. There may be a way to avoid having this limitation, by using logarithmic depth or a reverse Z buffer, but it needs some research.

The radius isn't the issue, lowering it doesn't change anything, and this doesn't appear with any sort of soft shadows (low or ultra) in Project settings. Also Dual Paraboloid results in the exact same artifact.. Any Omni Light when Project Settings Soft Shadow Quality is set Hard will have the issue pictured above.
In conclusion, this isn't an issue with that. Yes the radius is large, and it is so because I originally came to see how much it'd impact things, and I've concluded that That limitation is really for me not going to be any sort of a problem, however having an option for tweaking that might be useful for some people's projects.
Aside from this issue when Project Settings Shadows are set to Hard instead of Soft however, everything works as expected and is a Huge improvement on the existing stuff and I haven't been able to find any other issues in my testing (aside from the 2 Known issues you've stated above)

Alright, I will take a look at the attached project then :)

I updated this PR and should be ready for review now. I took the time to go over spot light shadows as well and fixed a couple of things, they should work much better now.
@mrjustaguy The issue you mentioned was indeed a mistake in the hard shadows code path, that should be fixed as well.

I updated the PR addressing the feedback. The CI fails on the doctool, but I was looking into it earlier today and it seems to be bogus behavior in the doc generation itself.
Light3D can't be instanced, so in order to get the default property values, it instances one inheriting class that can be instanced. So for OmniLight3D sometimes the default value is checked against OmniLigh3D itself and sometimes against some of the other light types.


QR code improvements

[ ] adding the ability to request from a QR (this is send only after the redesign). this would involve changing behavior when scanning QR from the ‘request’ flow, no design changes
[ ] deeplink updates so links work while the app is backgrounded (came from grameen brainstorm) — @yorhodes  has some more context on this, but he mentioned this would be easy
[ ] since we now have links-- adding this link to the QR page per the new QR code page designs

add:

[ ] Deeplink should conditionally route to app/play store if the app not installed


missing tag 0.2.5

Thanks for reporting! I'll push once back home.
On Jan 9, 2016 07:51, "kenji yoshida"<EMAIL_ADDRESS>wrote:

—
Reply to this email directly or view it on GitHub
https://github.com/ktoso/sbt-jmh/issues/64.

Solved https://github.com/ktoso/sbt-jmh/releases/tag/v0.2.5


"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
  }
]

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?

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

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

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?

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

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

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 ~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?

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


Add releasing file

Accidentally merged the previous PR before adding this file.
This adds some steps for releasing a new version.

Current dependencies on/for this PR:

main

PR #4   👈

This comment was auto-generated by Graphite.


Corrected pgmspace include on ESP8266

Added correct pgmspace include for ESP8266. Closes #39

Ok, merged.
@ekstrand: After a bit of googling I found this: "AVR references Atmel AVR and is specific to the AVR chips. (...) the gist of porting it is to replace the AVR portions (dealing with memory) to strict Wired / C"
I'm not sure what is to be achieved in this case, so very possible that more changes are required for porting this library to whatever new env in attempted here.