Skip to content

Instantly share code, notes, and snippets.

View joewildish's full-sized avatar

Joe Wildish joewildish

  • Eno Consulting Ltd
  • London, United Kingdom
View GitHub Profile
@joewildish
joewildish / gist:8eb66815d728399687b24647df941746
Created November 18, 2021 16:59
Plan path estimate degradation
Nested Loop Left Join (cost=2.29..348095.52 rows=3 width=93) (actual time=828.619..3368.362 rows=517367 loops=1)
-> Nested Loop (cost=1.86..348094.00 rows=3 width=81) (actual time=828.609..2655.136 rows=517367 loops=1)
Join Filter: (clients.id = order_items.client_id)
-> Nested Loop (cost=1.43..347875.73 rows=400 width=60) (actual time=828.603..1890.900 rows=517367 loops=1)
Join Filter: (clients.id = order_items_1.client_id)
-> Merge Join (cost=1.00..322712.24 rows=50370 width=48) (actual time=828.584..1224.993 rows=517367 loops=1)
Merge Cond: (order_items_2.client_id = clients.id)
-> GroupAggregate (cost=0.85..290718.67 rows=2518498 width=44) (actual time=0.040..1126.298 rows=1856351 loops=1)
Group Key: order_items_2.client_id, order_items_2.order_item_id
-> Merge Left Join (cost=0.85..240348.71 rows=2518498 width=18) (actual time=0.033..535.466 rows=1858076 loo

Keybase proof

I hereby claim:

  • I am joewildish on github.
  • I am joewildish (https://keybase.io/joewildish) on keybase.
  • I have a public key whose fingerprint is 97DE FD9E E076 88AE 963E 8FB0 7B2F EAB2 432E 67CA

To claim this, I am signing this object: