explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X6yq

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

Sort (cost=246.96..246.96 rows=1 width=518) (actual rows= loops=)

  • Sort Key: content.sequence
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=222.34..246.95 rows=1 width=518) (actual rows= loops=)

  • Join Filter: ((lrc.id)::text <> (content.id)::text)
  • Filter: ((NOT content.deleted) OR ((("firstRelease".id IS NULL) OR ("firstRelease".published_at > now())) AND (lrc.id IS NOT NULL) AND (lr2.published_at < now())))
3. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=222.04..246.45 rows=1 width=550) (actual rows= loops=)

  • Hash Cond: ((content2.uri)::text = (content.uri)::text)
  • Join Filter: (content.revision < content2.revision)
  • Filter: (content2.id IS NULL)
4. 0.000 0.000 ↓ 0.0

Seq Scan on content content2 (cost=0.00..15.30 rows=530 width=68) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash (cost=221.10..221.10 rows=75 width=550) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=173.48..221.10 rows=75 width=550) (actual rows= loops=)

  • Hash Cond: ("draftEntry".release_id = "draftRelease".id)
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=162.17..209.60 rows=75 width=450) (actual rows= loops=)

  • Hash Cond: ((content.id)::text = ("draftEntry".content_id)::text)
8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=128.09..169.73 rows=37 width=446) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=127.94..162.13 rows=37 width=370) (actual rows= loops=)

  • Hash Cond: ((content_field.content_id)::text = (content.id)::text)
10. 0.000 0.000 ↓ 0.0

Seq Scan on content_field (cost=0.00..22.70 rows=1,270 width=36) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Hash (cost=127.74..127.74 rows=16 width=366) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=29.77..127.74 rows=16 width=366) (actual rows= loops=)

  • Join Filter: ((lre.content_id)::text ~~ concat(content.uri, '%'))
13. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=29.77..48.19 rows=3 width=334) (actual rows= loops=)

  • Hash Cond: ("lastRelease".id = content.last_release_id)
14. 0.000 0.000 ↓ 0.0

Seq Scan on release "lastRelease" (cost=0.00..16.10 rows=610 width=104) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash (cost=29.74..29.74 rows=3 width=230) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=11.32..29.74 rows=3 width=230) (actual rows= loops=)

  • Hash Cond: ("firstRelease".id = content.first_release_id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on release "firstRelease" (cost=0.00..16.10 rows=610 width=104) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=11.28..11.28 rows=3 width=126) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on content (cost=4.17..11.28 rows=3 width=126) (actual rows= loops=)

  • Recheck Cond: ((type_id)::text = 'faq.loan'::text)
20. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IDX_95dfb248300702af4049bfba0b" (cost=0.00..4.17 rows=3 width=0) (actual rows= loops=)

  • Index Cond: ((type_id)::text = 'faq.loan'::text)
21. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..26.05 rows=1,070 width=36) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on release_entry lre (cost=0.00..20.70 rows=1,070 width=36) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using "PK_2ef30585518f778380652859051" on field (cost=0.15..0.21 rows=1 width=80) (actual rows= loops=)

  • Index Cond: (id = content_field.field_id)
24. 0.000 0.000 ↓ 0.0

Hash (cost=20.70..20.70 rows=1,070 width=36) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on release_entry "draftEntry" (cost=0.00..20.70 rows=1,070 width=36) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Hash (cost=11.27..11.27 rows=3 width=104) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on release "draftRelease" (cost=4.17..11.27 rows=3 width=104) (actual rows= loops=)

  • Recheck Cond: (published_at IS NULL)
28. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on "IDX_76a4433cae8df2827daf7a9b8e" (cost=0.00..4.17 rows=3 width=0) (actual rows= loops=)

  • Index Cond: (published_at IS NULL)
29. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.30..0.47 rows=1 width=40) (actual rows= loops=)

  • -> Index Scan using "PK_62a0469a3dfd5dae86a963e18cd" on release lr2 (cost=0.15..0.26 rows=1 width=12)" Index Cond: (id = lrc.last_release_id)
30. 0.000 0.000 ↓ 0.0

Index Scan using "PK_71694addca1fc3aa15fecbe01fe" on content lrc (cost=0.15..0.21 rows=1 width=36) (actual rows= loops=)

  • Index Cond: ((id)::text = (lre.content_id)::text)
  • Filter: (last_release_id IS NOT NULL)