explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eW19

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

Subquery Scan on sub (cost=4,338,742.92..4,340,784.30 rows=136,092 width=4) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=4,338,742.92..4,339,423.38 rows=136,092 width=117) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=4,338,742.92..4,339,083.15 rows=136,092 width=117) (actual rows= loops=)

  • Sort Key: md.docket_entry_id, (COALESCE(((md.description ~~* '%complaint%'::text) OR (md.description ~~* '%petition%'::text)), false)) DESC NULLS LAST, (COALESCE((md.description ~~* '%state %'::text), false)) DESC NULLS LAST, ((md.pages > 4)) DESC NULLS LAST, md."primary", md.number
4. 0.000 0.000 ↓ 0.0

Gather (cost=848,254.98..4,327,138.20 rows=136,092 width=117) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=847,254.98..4,312,529.00 rows=56,705 width=117) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Anti Join (cost=847,254.98..4,229,590.39 rows=56,889 width=34) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=847,254.98..4,154,947.63 rows=59,910 width=38) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=847,254.55..4,042,602.38 rows=74,384 width=38) (actual rows= loops=)

  • Hash Cond: (md.docket_entry_id = de.id)
9. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on multiple_document md (cost=0.00..3,134,534.10 rows=16,134,348 width=34) (actual rows= loops=)

  • Filter: ((description ~~* '%complaint%'::text) OR (description ~~* '%petition%'::text) OR (description ~~* '%state %'::text) OR (pages > 4))
10. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=845,166.54..845,166.54 rows=167,041 width=8) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..845,166.54 rows=167,041 width=8) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Parallel Append (cost=0.00..293,841.60 rows=167,042 width=4) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Parallel Bitmap Heap Scan on positve_docket_tags nor_pdt_1 (cost=8,531.52..293,006.39 rows=167,041 width=4) (actual rows= loops=)

  • Recheck Cond: (tag_id = 324)
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ix_positve_docket_tags_tag_id (cost=0.00..8,431.30 rows=400,898 width=0) (actual rows= loops=)

  • Index Cond: (tag_id = 324)
15. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on positive_docket_tags nor_pdt (cost=0.00..0.00 rows=1 width=4) (actual rows= loops=)

  • Filter: (tag_id = 324)
16. 0.000 0.000 ↓ 0.0

Index Only Scan using docket_entry_pkey on docket_entry de (cost=0.57..3.30 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = nor_pdt_1.docket_entry_id)
17. 0.000 0.000 ↓ 0.0

Index Only Scan using iplc_case_id_terminated_on_court_id_idx on iplc_case c (cost=0.43..1.51 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = md.case_id)
  • Filter: ((terminated_on >= '2009-01-01'::date) OR (terminated_on IS NULL))
18. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1.27 rows=2 width=4) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Seq Scan on positive_case_tags mdl_pct (cost=0.00..0.00 rows=1 width=4) (actual rows= loops=)

  • Filter: ((tag_id = 285) AND (case_id = c.id))
20. 0.000 0.000 ↓ 0.0

Index Only Scan using positve_case_tags_pkey on positve_case_tags mdl_pct_1 (cost=0.43..1.26 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((case_id = c.id) AND (tag_id = 285))
21. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1.43 rows=2 width=4) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on positive_docket_tags complaint_pdt (cost=0.00..0.00 rows=1 width=4) (actual rows= loops=)

  • Filter: ((tag_id = 257) AND (docket_entry_id = de.id))
23. 0.000 0.000 ↓ 0.0

Index Only Scan using positve_docket_tags_pkey on positve_docket_tags complaint_pdt_1 (cost=0.56..1.42 rows=1 width=4) (actual rows= loops=)

  • Index Cond: ((docket_entry_id = de.id) AND (tag_id = 257))