explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9Sav

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

Hash Left Join (cost=117.48..5,326,171.25 rows=624 width=1,154) (actual rows= loops=)

  • Hash Cond: (doc.req_meet_id = (rmf.req_meet_id)::numeric)
  • Functions: 103
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=116.37..5,326,163.73 rows=624 width=709) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=116.08..5,325,830.79 rows=624 width=684) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=115.80..5,325,383.47 rows=624 width=674) (actual rows= loops=)

  • Hash Cond: ((conv.company_id)::numeric = conv_company.id)
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=114.73..5,325,380.65 rows=624 width=666) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=114.45..5,325,049.27 rows=624 width=641) (actual rows= loops=)

  • Join Filter: (conv.id = c.id)
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=10.48..5,291,640.77 rows=1,105,506 width=502) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.54..2,523,434.84 rows=551,215 width=484) (actual rows= loops=)

  • Join Filter: ((COALESCE(doc.complaint_id, '0'::numeric) = conv.complaint_id) OR (COALESCE(doc.inquiry_id, '0'::numeric) = conv.inquiry_id) OR (COALESCE(doc.application_id, '0'::numeric) = conv.application_id) OR (COALESCE(doc.req_meet_id, '0'::numeric) = (conv.req_meet_id)::numeric))
9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.54..18,813.16 rows=3,545 width=292) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.26..16,930.78 rows=3,545 width=267) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=9.12..16,372.12 rows=3,545 width=198) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=8.84..13,839.76 rows=3,545 width=180) (actual rows= loops=)

  • Join Filter: (conv.employee_id = conv_emp.id)
13. 0.000 0.000 ↓ 0.0

Index Scan using t_conversation_pkey on t_conversation conv (cost=0.28..221.25 rows=3,545 width=139) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Materialize (cost=8.56..484.90 rows=247 width=46) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Join (cost=8.56..483.67 rows=247 width=46) (actual rows= loops=)

  • Hash Cond: (conv_emp_user.id = conv_emp.user_id)
16. 0.000 0.000 ↓ 0.0

Seq Scan on t_user conv_emp_user (cost=0.00..435.10 rows=10,010 width=23) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Hash (cost=5.47..5.47 rows=247 width=33) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Seq Scan on institutions_employees conv_emp (cost=0.00..5.47 rows=247 width=33) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Index Scan using t_user_pkey on t_user conv_user (cost=0.29..0.71 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (id = conv.user_id)
20. 0.000 0.000 ↓ 0.0

Index Scan using institutions_pkey on institutions conv_inst (cost=0.14..0.16 rows=1 width=74) (actual rows= loops=)

  • Index Cond: (id = conv.institution_id)
21. 0.000 0.000 ↓ 0.0

Index Scan using t_conversation_message_pkey on t_conversation_message inst_msg (cost=0.28..0.53 rows=1 width=30) (actual rows= loops=)

  • Index Cond: (id = conv.institution_msg_id)
22. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1,833.65 rows=28,241 width=192) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Subquery Scan on doc (cost=0.00..1,692.45 rows=28,241 width=192) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Append (cost=0.00..1,410.04 rows=28,241 width=224) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on complaints comp (cost=0.00..321.26 rows=8,726 width=175) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Seq Scan on inquiries inq (cost=0.00..663.09 rows=19,509 width=184) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on t_application_form appl (cost=0.00..1.01 rows=1 width=185) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=0.00..1.11 rows=5 width=224) (actual rows= loops=)

29. 0.000 0.000 ↓ 0.0

Seq Scan on t_requirement_meets trm (cost=0.00..1.05 rows=5 width=200) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on document_numbers doc_num (cost=0.94..4.99 rows=3 width=34) (actual rows= loops=)

  • Recheck Cond: ((COALESCE(doc.complaint_id, '0'::numeric) = complaint_id) OR (COALESCE(doc.inquiry_id, '0'::numeric) = inquiry_id) OR (COALESCE(doc.application_id, '0'::numeric) = application_form_id))
31. 0.000 0.000 ↓ 0.0

BitmapOr (cost=0.94..0.94 rows=3 width=0) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on uc_doc_numbers_comp_inquiry (cost=0.00..0.32 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (complaint_id = COALESCE(doc.complaint_id, '0'::numeric))
33. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on doc_numb_inquiry_id_idx (cost=0.00..0.31 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (inquiry_id = COALESCE(doc.inquiry_id, '0'::numeric))
34. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fk_document_numbers_af_id_idx (cost=0.00..0.31 rows=1 width=0) (actual rows= loops=)

  • Index Cond: (application_form_id = COALESCE(doc.application_id, '0'::numeric))
35. 0.000 0.000 ↓ 0.0

Materialize (cost=103.97..243.32 rows=2 width=139) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=103.97..243.29 rows=2 width=139) (actual rows= loops=)

  • Join Filter: ((trm_1.vendor_code)::text = (comp_1.code_hash)::text)
37. 0.000 0.000 ↓ 0.0

Seq Scan on t_company comp_1 (cost=0.00..1.04 rows=1 width=11) (actual rows= loops=)

  • Filter: (id = '1160'::numeric)
38. 0.000 0.000 ↓ 0.0

Hash Join (cost=103.97..242.19 rows=5 width=149) (actual rows= loops=)

  • Hash Cond: (s.conversation_id = c.id)
39. 0.000 0.000 ↓ 0.0

Subquery Scan on s (cost=0.00..124.90 rows=3,540 width=5) (actual rows= loops=)

  • Filter: (s.sender_company_id IS NULL)
40. 0.000 0.000 ↓ 0.0

Seq Scan on t_conversation (cost=0.00..89.45 rows=3,545 width=115) (actual rows= loops=)

41. 0.000 0.000 ↓ 0.0

Hash (cost=103.91..103.91 rows=5 width=149) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.11..103.91 rows=5 width=149) (actual rows= loops=)

  • Hash Cond: (c.req_meet_id = trm_1.req_meet_id)
43. 0.000 0.000 ↓ 0.0

Seq Scan on t_conversation c (cost=0.00..89.45 rows=3,545 width=139) (actual rows= loops=)

44. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=18) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on t_requirement_meet_form trm_1 (cost=0.00..1.05 rows=5 width=18) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Index Scan using t_conversation_message_pkey on t_conversation_message user_msg (cost=0.28..0.53 rows=1 width=30) (actual rows= loops=)

  • Index Cond: (id = conv.user_msg_id)
47. 0.000 0.000 ↓ 0.0

Hash (cost=1.03..1.03 rows=3 width=16) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Seq Scan on t_company conv_company (cost=0.00..1.03 rows=3 width=16) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Index Scan using t_user_pkey on t_user conv_company_representative_user (cost=0.29..0.72 rows=1 width=23) (actual rows= loops=)

  • Index Cond: (id = (conv.company_representative_user_id)::numeric)
50. 0.000 0.000 ↓ 0.0

Index Scan using t_conversation_message_pkey on t_conversation_message company_msg (cost=0.28..0.53 rows=1 width=30) (actual rows= loops=)

  • Index Cond: (id = (conv.company_representative_msg_id)::numeric)
51. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=26) (actual rows= loops=)

52. 0.000 0.000 ↓ 0.0

Seq Scan on t_requirement_meet_form rmf (cost=0.00..1.05 rows=5 width=26) (actual rows= loops=)