explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BACD

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Seq Scan on sungero_system_foldertag t (cost=0.00..417,410,955,839.37 rows=1,638,076 width=24) (actual rows= loops=)

  • Filter: (SubPlan 1)
2.          

SubPlan (for Seq Scan)

3. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1.42..127,408.89 rows=1 width=28) (actual rows= loops=)

  • Group Key: ft.entityid, ft.folderid, ft.owner
  • Filter: (sum(COALESCE(link.id, 0)) = 0)
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.42..127,408.87 rows=1 width=28) (actual rows= loops=)

  • Join Filter: ((link.destinationid = items.id) AND (link.destinationtypeguid = items.discriminator) AND (link.folder = folder.id))
  • -> Index Scan using idx_destinationid_destinationtypeguid on sungero_core_link link (cost=0.43..2.65 rows=1 width=28)' Index Cond: (destinationid = t.entityid)'
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.99..127,406.20 rows=1 width=48) (actual rows= loops=)

  • Join Filter: (folder.author = ft.owner)
6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.57..123,383.55 rows=1 width=44) (actual rows= loops=)

  • Join Filter: (ft.entityid = items.id)
7. 0.000 0.000 ↓ 0.0

Seq Scan on sungero_system_foldertag ft (cost=0.00..123,380.75 rows=1 width=24) (actual rows= loops=)

  • Filter: ((entityid = t.entityid) AND (owner = t.owner) AND (folderid = t.folderid) AND (folderid = ANY ('{c21fa108-1570-4155-8a0c-0d04957bc72b,0d61168d-1ae5-4570-a42e-bdd5f3b07b02,669ff039-2f05-4eb3-9d6a-049dafee948f,1ead1abe-1b7e-4833-9e01-ee7f8404537a,852ea6a2-304e-48d1-88e5-1bcbb1fb69a2,a353a121-f96e-4842-8b80-bf77d074a0c2,35d23c5e-9106-4068-bc3a-46b471928fa0,a584ebf5-f9b3-4e41-b7cf-15d8c2f96844,aee5f0a0-8a5f-422f-bc40-e98db38e94ca,ae3b3ff0-73ac-4590-961c-adf4579d59de,1031e40e-2c3a-4964-92ce-92036cdcb3b9}'::uuid[])))
8. 0.000 0.000 ↓ 0.0

Index Scan using sungero_wf_assignment_pk on sungero_wf_assignment items (cost=0.57..2.79 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = t.entityid)
9. 0.000 0.000 ↓ 0.0

Index Scan using idx_folder_discriminator_specialfoldertype_author on sungero_core_folder folder (cost=0.42..4,022.64 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (author = t.owner)
  • Filter: (isspecial AND (name = 'eb72a985-606c-4647-ba0c-1389928a4e17'::citext))