explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3Ds3

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

Limit (cost=224,837.42..224,837.62 rows=20 width=48) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=224,837.42..227,010.92 rows=217,350 width=48) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=224,837.42..225,380.80 rows=217,350 width=48) (actual rows= loops=)

  • Sort Key: claims.date_filed DESC, (ROW(("substring"((claims.claim_number)::text, 'w*[0-9]+'::text))::integer, "substring"((claims.claim_number)::text, '^[\\D^\\s]+'::text))) DESC, claims.id
4. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=107,612.37..198,881.21 rows=217,350 width=48) (actual rows= loops=)

  • Hash Cond: (bankruptcy_cases.id = bankruptcy_cases_1.id)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=106,603.21..192,358.07 rows=351,414 width=37) (actual rows= loops=)

  • Hash Cond: (ownerships_claims.id = negotiations.ownership_id)
6. 0.000 0.000 ↓ 0.0

Gather (cost=106,601.53..191,038.54 rows=351,414 width=45) (actual rows= loops=)

  • Workers Planned: 2
7. 0.000 0.000 ↓ 0.0

Parallel Hash Left Join (cost=105,601.53..154,897.14 rows=146,422 width=45) (actual rows= loops=)

  • Hash Cond: (claims.id = ownerships_claims.claim_id)
8. 0.000 0.000 ↓ 0.0

Parallel Hash Left Join (cost=65,664.55..108,742.52 rows=81,748 width=37) (actual rows= loops=)

  • Hash Cond: (claims.id = portions.claim_id)
9. 0.000 0.000 ↓ 0.0

Parallel Hash Anti Join (cost=51,570.71..91,861.62 rows=81,748 width=37) (actual rows= loops=)

  • Hash Cond: (claims.id = portions_1.claim_id)
10. 0.000 0.000 ↓ 0.0

Parallel Hash Left Join (cost=40,899.90..80,149.18 rows=84,295 width=37) (actual rows= loops=)

  • Hash Cond: (claims.id = ownerships.claim_id)
  • Filter: ((ownerships.ended_at IS NULL) AND (ownerships.ended_at IS NULL))
11. 0.000 0.000 ↓ 0.0

Hash Join (cost=158.92..30,500.59 rows=152,020 width=37) (actual rows= loops=)

  • Hash Cond: (claims.bankruptcy_case_id = bankruptcy_cases.id)
12. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on claims (cost=57.19..29,794.17 rows=229,959 width=29) (actual rows= loops=)

  • Filter: ((deleted_at IS NULL) AND show_in_marketplace AND (NOT (hashed SubPlan 1)))
13.          

SubPlan (for Parallel Seq Scan)

14. 0.000 0.000 ↓ 0.0

Nested Loop (cost=4.26..57.19 rows=3 width=8) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=3.83..55.56 rows=3 width=8) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Hash Semi Join (cost=3.40..4.89 rows=6 width=8) (actual rows= loops=)

  • Hash Cond: (negotiations_1.id = negotiation_events.negotiation_id)
17. 0.000 0.000 ↓ 0.0

Seq Scan on negotiations negotiations_1 (cost=0.00..1.30 rows=30 width=16) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=3.33..3.33 rows=6 width=16) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.68..3.33 rows=6 width=16) (actual rows= loops=)

  • Hash Cond: (negotiation_events.negotiation_id = negotiations_2.id)
20. 0.000 0.000 ↓ 0.0

Seq Scan on negotiation_events (cost=0.00..1.64 rows=6 width=8) (actual rows= loops=)

  • Filter: (action = 2)
21. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=30 width=8) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on negotiations negotiations_2 (cost=0.00..1.30 rows=30 width=8) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Index Scan using ownerships_pkey on ownerships ownerships_1 (cost=0.43..8.45 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id = negotiations_1.ownership_id)
  • Filter: ((deleted_at IS NULL) AND (ended_at IS NULL))
24. 0.000 0.000 ↓ 0.0

Index Scan using claims_pkey on claims claims_1 (cost=0.43..0.54 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = ownerships_1.claim_id)
  • Filter: (deleted_at IS NULL)
25. 0.000 0.000 ↓ 0.0

Hash (cost=81.54..81.54 rows=1,615 width=8) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on bankruptcy_cases (cost=0.00..81.54 rows=1,615 width=8) (actual rows= loops=)

  • Filter: ((deleted_at IS NULL) AND (deleted_at IS NULL) AND show_in_marketplace AND (date_filed >= '2018-09-14 00:00:00'::timestamp without time zone))
27. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=25,616.77..25,616.77 rows=823,777 width=24) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on ownerships (cost=0.00..25,616.77 rows=823,777 width=24) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)
29. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=10,497.14..10,497.14 rows=13,894 width=8) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on portions portions_1 (cost=0.00..10,497.14 rows=13,894 width=8) (actual rows= loops=)

  • Filter: (claim_class = 2)
31. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=9,850.71..9,850.71 rows=258,571 width=8) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on portions (cost=0.00..9,850.71 rows=258,571 width=8) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)
33. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=25,616.77..25,616.77 rows=823,777 width=16) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on ownerships ownerships_claims (cost=0.00..25,616.77 rows=823,777 width=16) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)
35. 0.000 0.000 ↓ 0.0

Hash (cost=1.30..1.30 rows=30 width=8) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Seq Scan on negotiations (cost=0.00..1.30 rows=30 width=8) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Hash (cost=990.27..990.27 rows=1,511 width=16) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Hash Join (cost=940.97..990.27 rows=1,511 width=16) (actual rows= loops=)

  • Hash Cond: (bankruptcy_cases__recursive.id = bankruptcy_cases_1.id)
39. 0.000 0.000 ↓ 0.0

CTE Scan on bankruptcy_cases__recursive (cost=835.00..865.22 rows=1,511 width=48) (actual rows= loops=)

40.          

CTE bankruptcy_cases__recursive

41. 0.000 0.000 ↓ 0.0

Recursive Union (cost=0.28..835.00 rows=1,511 width=48) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Index Scan using bankruptcy_cases_pkey on bankruptcy_cases bankruptcy_cases_2 (cost=0.28..8.30 rows=1 width=48) (actual rows= loops=)

  • Index Cond: (id = '758'::bigint)
  • Filter: (deleted_at IS NULL)
43. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.28..79.65 rows=151 width=48) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

WorkTable Scan on bankruptcy_cases__recursive bankruptcy_cases__recursive_1 (cost=0.00..0.20 rows=10 width=40) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Index Scan using index_bankruptcy_cases_on_parent_id on bankruptcy_cases bankruptcy_cases_3 (cost=0.28..7.76 rows=15 width=16) (actual rows= loops=)

  • Index Cond: (parent_id = bankruptcy_cases__recursive_1.id)
  • Filter: ((deleted_at IS NULL) AND (id <> ALL (bankruptcy_cases__recursive_1.__path)))
46. 0.000 0.000 ↓ 0.0

Hash (cost=75.43..75.43 rows=2,443 width=8) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Seq Scan on bankruptcy_cases bankruptcy_cases_1 (cost=0.00..75.43 rows=2,443 width=8) (actual rows= loops=)

  • Filter: (deleted_at IS NULL)