explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zemr : p

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

Gather Motion 40:1 (slice13; segments: 40) (cost=609,740.22..1,156,693.48 rows=19 width=356) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Hash Left Anti Semi Join (cost=609,740.22..1,156,693.48 rows=1 width=356) (actual rows= loops=)

  • Hash Cond: pei.transaction_source::text = pts.transaction_source::text
3. 0.000 0.000 ↓ 0.0

Hash Left Anti Semi Join (cost=609,704.35..878,984.21 rows=1 width=356) (actual rows= loops=)

  • Hash Cond: pei.transaction_source::text = pts.transaction_source::text
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=609,668.48..878,948.08 rows=1 width=356) (actual rows= loops=)

  • Hash Cond: hom.name::text = sv.segment_value_lookup::text
5. 0.000 0.000 ↓ 0.0

Redistribute Motion 40:40 (slice9; segments: 40) (cost=609,480.65..878,760.01 rows=1 width=348) (actual rows= loops=)

  • Hash Key: hom.name::text
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=609,480.65..878,759.63 rows=1 width=348) (actual rows= loops=)

  • Hash Cond: ppa.carrying_out_organization_id = hom.organization_id
7. 0.000 0.000 ↓ 0.0

Redistribute Motion 40:40 (slice8; segments: 40) (cost=609,435.16..878,713.85 rows=1 width=339) (actual rows= loops=)

  • Hash Key: ppa.carrying_out_organization_id
8. 0.000 0.000 ↓ 0.0

Hash Join (cost=609,435.16..878,713.46 rows=1 width=339) (actual rows= loops=)

  • Hash Cond: pc.expenditure_item_id = pei.expenditure_item_id
9. 0.000 0.000 ↓ 0.0

Seq Scan on pa_cost_distribution_lines_all pc (cost=0.00..243,652.91 rows=256,233 width=31) (actual rows= loops=)

  • Filter: gl_date <= '2019-06-20 00:00:00'::timestamp without time zone
10. 0.000 0.000 ↓ 0.0

Hash (cost=609,425.58..609,425.58 rows=20 width=316) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice7; segments: 40) (cost=570,843.82..609,425.58 rows=20 width=316) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Join (cost=570,843.82..609,417.72 rows=1 width=316) (actual rows= loops=)

  • Hash Cond: x.expenditure_id = pei.expenditure_id
13. 0.000 0.000 ↓ 0.0

Seq Scan on pa_expenditures_all x (cost=0.00..33,354.33 rows=52,194 width=24) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=570,843.58..570,843.58 rows=1 width=308) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Redistribute Motion 40:40 (slice6; segments: 40) (cost=420,959.75..570,843.58 rows=1 width=308) (actual rows= loops=)

  • Hash Key: pei.expenditure_id
16. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=420,959.75..570,843.19 rows=1 width=308) (actual rows= loops=)

  • Hash Cond: pei.expenditure_item_id = ec.expenditure_item_id
17. 0.000 0.000 ↓ 0.0

Hash Join (cost=21,400.89..171,284.06 rows=1 width=264) (actual rows= loops=)

  • Hash Cond: pei.project_id = ppa.project_id AND pei.task_id = pt.task_id
18. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on pa_expenditure_items_all pei (cost=6,653.28..152,787.23 rows=18,746 width=108) (actual rows= loops=)

  • Recheck Cond: system_linkage_function::text = 'VI'::text
  • Filter: expenditure_type::text !~~ 'Granite%'::text
19. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on pa_expenditure_items_n252 (cost=0.00..6,465.83 rows=18,885 width=0) (actual rows= loops=)

  • Index Cond: system_linkage_function::text = 'VI'::text
20. 0.000 0.000 ↓ 0.0

Hash (cost=14,707.89..14,707.89 rows=67 width=188) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice4; segments: 40) (cost=200.40..14,707.89 rows=67 width=188) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Hash Join (cost=200.40..14,680.74 rows=2 width=188) (actual rows= loops=)

  • Hash Cond: pt.project_id = ppa.project_id
23. 0.000 0.000 ↓ 0.0

Seq Scan on pa_tasks pt (cost=0.00..13,006.21 rows=14,734 width=72) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash (cost=200.39..200.39 rows=1 width=116) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice3; segments: 40) (cost=0.00..200.39 rows=1 width=116) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Index Scan using pa_projects_u2 on pa_projects_all ppa (cost=0.00..200.37 rows=1 width=116) (actual rows= loops=)

  • Index Cond: segment1::text = '300014'::text
  • Filter: org_id = 170::numeric
27. 0.000 0.000 ↓ 0.0

Hash (cost=293,594.78..293,594.78 rows=211,929 width=52) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Redistribute Motion 40:40 (slice5; segments: 40) (cost=0.00..293,594.78 rows=211,929 width=52) (actual rows= loops=)

  • Hash Key: ec.expenditure_item_id
29. 0.000 0.000 ↓ 0.0

Seq Scan on pa_expenditure_comments ec (cost=0.00..124,052.26 rows=211,929 width=52) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash (cost=42.44..42.44 rows=7 width=22) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Seq Scan on hr_all_organization_units hom (cost=0.00..42.44 rows=7 width=22) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Hash (cost=187.32..187.32 rows=2 width=22) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Redistribute Motion 40:40 (slice10; segments: 40) (cost=42.28..187.32 rows=2 width=22) (actual rows= loops=)

  • Hash Key: sv.segment_value_lookup::text
34. 0.000 0.000 ↓ 0.0

Hash Join (cost=42.28..186.51 rows=2 width=22) (actual rows= loops=)

  • Hash Cond: sv.segment_value_lookup_set_id = svs.segment_value_lookup_set_id
35. 0.000 0.000 ↓ 0.0

Seq Scan on pa_segment_value_lookups sv (cost=0.00..125.38 rows=184 width=29) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash (cost=42.26..42.26 rows=1 width=7) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on pa_segment_value_lookup_sets svs (cost=0.00..42.26 rows=1 width=7) (actual rows= loops=)

  • Filter: segment_value_lookup_set_name::text = 'PS_PA_PPS_PROJORG_LE'::text
38. 0.000 0.000 ↓ 0.0

Hash (cost=35.37..35.37 rows=1 width=17) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice11; segments: 40) (cost=0.00..35.37 rows=1 width=17) (actual rows= loops=)

40. 0.000 0.000 ↓ 0.0

Seq Scan on pa_transaction_sources pts (cost=0.00..34.96 rows=1 width=17) (actual rows= loops=)

  • Filter: transaction_source::text = 'Supplier Invoices M4A'::text AND transaction_source::text IS NOT NULL
41. 0.000 0.000 ↓ 0.0

Hash (cost=35.37..35.37 rows=1 width=17) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice12; segments: 40) (cost=0.00..35.37 rows=1 width=17) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Seq Scan on pa_transaction_sources pts (cost=0.00..34.96 rows=1 width=17) (actual rows= loops=)

  • Filter: transaction_source::text = 'AP INVOICE'::text AND transaction_source::text IS NOT NULL
44.          

SubPlan (forHash Left Anti Semi Join)

45. 0.000 0.000 ↓ 0.0

HashAggregate (cost=388.63..388.64 rows=1 width=498) (actual rows= loops=)

  • Group By: pv.vendor_name
46. 0.000 0.000 ↓ 0.0

Result (cost=388.61..388.62 rows=1 width=24) (actual rows= loops=)

  • Filter: pv.vendor_id = $1
47. 0.000 0.000 ↓ 0.0

Materialize (cost=388.61..388.62 rows=1 width=24) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice2; segments: 40) (cost=0.00..388.61 rows=1 width=24) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on po_vendors pv (cost=0.00..388.61 rows=1 width=24) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Result (cost=14,479.51..14,479.52 rows=1 width=5) (actual rows= loops=)

  • Filter: t2.task_id = $0
51. 0.000 0.000 ↓ 0.0

Materialize (cost=14,479.51..14,479.52 rows=1 width=5) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Broadcast Motion 40:40 (slice1; segments: 40) (cost=0.00..14,479.51 rows=1 width=5) (actual rows= loops=)

53. 0.000 0.000 ↓ 0.0

Seq Scan on pa_tasks t2 (cost=0.00..14,479.51 rows=1 width=5) (actual rows= loops=)