explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WlIEt : Optimization for: plan #JcEX

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.035 0.054 ↓ 0.0 0 1

Sort (cost=6,017.02..6,017.03 rows=1 width=5,960) (actual time=0.054..0.054 rows=0 loops=1)

  • Sort Key: me.hour_id
  • Sort Method: quicksort Memory: 25kB
2. 0.000 0.019 ↓ 0.0 0 1

Nested Loop Left Join (cost=699.14..6,017.01 rows=1 width=5,960) (actual time=0.019..0.019 rows=0 loops=1)

3. 0.000 0.019 ↓ 0.0 0 1

Nested Loop Left Join (cost=698.72..6,008.79 rows=1 width=5,810) (actual time=0.019..0.019 rows=0 loops=1)

4. 0.001 0.019 ↓ 0.0 0 1

Nested Loop Left Join (cost=698.45..6,008.49 rows=1 width=5,794) (actual time=0.019..0.019 rows=0 loops=1)

5. 0.000 0.018 ↓ 0.0 0 1

Nested Loop Left Join (cost=698.02..6,007.71 rows=1 width=5,463) (actual time=0.018..0.018 rows=0 loops=1)

6. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=697.61..5,999.93 rows=1 width=5,293) (actual time=0.018..0.018 rows=0 loops=1)

7. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=697.32..5,992.57 rows=1 width=3,946) (actual time=0.018..0.018 rows=0 loops=1)

  • Join Filter: ("user".user_id = o.object_id)
8. 0.000 0.018 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.98..896.71 rows=101 width=2,519) (actual time=0.018..0.018 rows=0 loops=1)

9. 0.000 0.018 ↓ 0.0 0 1

Nested Loop (cost=0.70..858.47 rows=101 width=1,570) (actual time=0.018..0.018 rows=0 loops=1)

10. 0.018 0.018 ↓ 0.0 0 1

Index Scan using im_hours_project_id_idx on im_hours me (cost=0.42..427.16 rows=101 width=197) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (project_id = ANY ('{9729878,9729881,9729884,9729887,9729890,9729893,9729896}'::integer[]))
11. 0.000 0.000 ↓ 0.0 0

Index Scan using users_pk on users "user" (cost=0.28..4.26 rows=1 width=1,373) (never executed)

  • Index Cond: (user_id = me.user_id)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using im_company_primary_contact_id__idx on im_companies im_companies_primary_contacts (cost=0.28..0.37 rows=1 width=949) (never executed)

  • Index Cond: (primary_contact_id = "user".user_id)
13. 0.000 0.000 ↓ 0.0 0

Materialize (cost=696.33..5,094.35 rows=1 width=1,431) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=696.33..5,094.34 rows=1 width=1,431) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=696.05..5,093.89 rows=1 width=1,423) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=695.62..2,067.40 rows=540 width=1,346) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=695.33..1,003.28 rows=1,974 width=1,338) (never executed)

  • Hash Cond: (u.user_id = pa.party_id)
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on users u (cost=0.00..267.43 rows=5,543 width=1,248) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Hash (cost=626.05..626.05 rows=5,542 width=90) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=179.69..626.05 rows=5,542 width=90) (never executed)

  • Hash Cond: (pa.party_id = pe.person_id)
21. 0.000 0.000 ↓ 0.0 0

Seq Scan on parties pa (cost=0.00..332.59 rows=15,559 width=70) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Hash (cost=110.42..110.42 rows=5,542 width=20) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Seq Scan on persons pe (cost=0.00..110.42 rows=5,542 width=20) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Index Scan using group_element_index_pk on group_element_index (cost=0.29..0.53 rows=1 width=8) (never executed)

  • Index Cond: ((element_id = pa.party_id) AND (group_id = '-2'::integer))
  • Filter: (((ancestor_rel_type)::text = 'membership_rel'::text) AND ((rel_type)::text = 'membership_rel'::text) AND (container_id = '-2'::integer))
25. 0.000 0.000 ↓ 0.0 0

Index Scan using acs_objects_pk on acs_objects o (cost=0.43..5.59 rows=1 width=77) (never executed)

  • Index Cond: (object_id = pa.party_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using membership_rel_rel_id_pk on membership_rels mr (cost=0.29..0.44 rows=1 width=12) (never executed)

  • Index Cond: (rel_id = group_element_index.rel_id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using im_projects_pk on im_projects project (cost=0.29..7.36 rows=1 width=1,347) (never executed)

  • Index Cond: (project_id = me.project_id)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using im_invoices_pk on im_invoices invoice (cost=0.42..7.76 rows=1 width=170) (never executed)

  • Index Cond: (invoice_id = me.invoice_id)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using im_costs_pk on im_costs im_cost (cost=0.42..0.77 rows=1 width=331) (never executed)

  • Index Cond: (cost_id = invoice.invoice_id)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using im_categories_pk on im_categories (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Index Cond: (category_id = im_cost.cost_status_id)
  • Filter: ((category_id <> 3812) AND ((category_type)::text = 'Intranet Cost Status'::text))
31. 0.000 0.000 ↓ 0.0 0

Index Scan using im_invoices_items_pk on im_invoice_items invoice_item (cost=0.42..8.20 rows=1 width=118) (never executed)

  • Index Cond: (item_id = me.invoice_item_id)
Planning time : 10.724 ms
Execution time : 1.343 ms