explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7pJK

Settings
# exclusive inclusive rows x rows loops node
1. 1,942.641 3,775.121 ↓ 4.4 25,541 1

Hash Left Join (cost=1,723.78..1,018,457.70 rows=5,849 width=737) (actual time=67.186..3,775.121 rows=25,541 loops=1)

  • Hash Cond: (doc.id = fav.business_object_id)
2. 16.939 861.892 ↓ 4.4 25,541 1

Nested Loop Left Join (cost=1,721.65..64,035.61 rows=5,849 width=721) (actual time=66.444..861.892 rows=25,541 loops=1)

3. 11.187 717.248 ↓ 4.4 25,541 1

Nested Loop (cost=1,721.23..61,347.23 rows=5,849 width=705) (actual time=66.411..717.248 rows=25,541 loops=1)

4. 32.352 527.274 ↓ 4.4 25,541 1

Nested Loop (cost=1,720.80..32,284.58 rows=5,849 width=689) (actual time=66.387..527.274 rows=25,541 loops=1)

5. 16.892 290.594 ↓ 4.4 25,541 1

Hash Join (cost=1,720.38..3,558.38 rows=5,849 width=640) (actual time=66.343..290.594 rows=25,541 loops=1)

  • Hash Cond: (c.bo_type = cbot.id)
6. 178.085 273.678 ↓ 4.4 25,541 1

Hash Join (cost=1,718.81..3,476.39 rows=5,849 width=642) (actual time=66.282..273.678 rows=25,541 loops=1)

  • Hash Cond: (c.parent_id = d.id)
7. 29.370 29.370 ↑ 1.6 30,211 1

Seq Scan on t_card c (cost=0.00..1,514.49 rows=49,229 width=93) (actual time=0.021..29.370 rows=30,211 loops=1)

  • Filter: ((NOT del_rec) AND ((reg_number)::text <> ''::text))
  • Rows Removed by Filter: 18986
8. 23.760 66.223 ↓ 5.8 35,602 1

Hash (cost=1,642.01..1,642.01 rows=6,144 width=549) (actual time=66.223..66.223 rows=35,602 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4072kB
9. 17.044 42.463 ↓ 5.8 35,602 1

Hash Join (cost=1.38..1,642.01 rows=6,144 width=549) (actual time=0.042..42.463 rows=35,602 loops=1)

  • Hash Cond: (d.bo_type = dbot.id)
10. 25.405 25.405 ↓ 1.0 51,276 1

Seq Scan on t_document d (cost=0.00..1,387.18 rows=51,203 width=35) (actual time=0.011..25.405 rows=51,276 loops=1)

  • Filter: ((NOT is_duplicate) OR del_rec)
  • Rows Removed by Filter: 455
11. 0.004 0.014 ↑ 1.0 3 1

Hash (cost=1.34..1.34 rows=3 width=518) (actual time=0.014..0.014 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
12. 0.010 0.010 ↑ 1.0 3 1

Seq Scan on t_business_object_types dbot (cost=0.00..1.34 rows=3 width=518) (actual time=0.004..0.010 rows=3 loops=1)

  • Filter: ((typeof)::text = ANY ('{Integro.Objects.Modules.Docflow.DocflowObjects.IncomingDocument,Integro.Objects.Modules.Docflow.DocflowObjects.OutgoingDocument,Integro.Objects.Modules.Docflow.Docflow (...)
  • Rows Removed by Filter: 22
13. 0.012 0.024 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=2) (actual time=0.024..0.024 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 0.012 0.012 ↑ 1.0 25 1

Seq Scan on t_business_object_types cbot (cost=0.00..1.25 rows=25 width=2) (actual time=0.009..0.012 rows=25 loops=1)

15. 204.328 204.328 ↑ 1.0 1 25,541

Index Scan using t_docflow_businessobjects_pkey on t_docflow_businessobjects doc (cost=0.43..4.90 rows=1 width=65) (actual time=0.008..0.008 rows=1 loops=25,541)

  • Index Cond: (id = d.id)
16. 178.787 178.787 ↑ 1.0 1 25,541

Index Scan using t_docflow_businessobjects_pkey on t_docflow_businessobjects card (cost=0.43..4.96 rows=1 width=48) (actual time=0.006..0.007 rows=1 loops=25,541)

  • Index Cond: (id = c.id)
17. 127.705 127.705 ↓ 0.0 0 25,541

Index Only Scan using l_readers_pkey on l_readers read (cost=0.42..0.45 rows=1 width=16) (actual time=0.005..0.005 rows=0 loops=25,541)

  • Index Cond: ((business_object_id = doc.id) AND (employee_id = 'a5098b77-8081-42d4-b912-10a83e086747'::uuid))
  • Heap Fetches: 0
18. 0.000 0.030 ↓ 0.0 0 1

Hash (cost=2.11..2.11 rows=1 width=16) (actual time=0.030..0.030 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
19. 0.030 0.030 ↓ 0.0 0 1

Seq Scan on l_favorites fav (cost=0.00..2.11 rows=1 width=16) (actual time=0.030..0.030 rows=0 loops=1)

  • Filter: (employee_id = 'a5098b77-8081-42d4-b912-10a83e086747'::uuid)
  • Rows Removed by Filter: 89
20.          

SubPlan (forHash Left Join)

21. 255.410 255.410 ↑ 12.0 1 25,541

Index Scan using t_docflow_businessobjects_parent_id_idx on t_docflow_businessobjects (cost=0.43..88.99 rows=12 width=0) (actual time=0.010..0.010 rows=1 loops=25,541)

  • Index Cond: (parent_id = doc.id)
  • Filter: ((NOT del_rec) AND (business_object_type <> ALL ('{2,101,102,103,400,1000,1100,5002}'::integer[])))
  • Rows Removed by Filter: 1
22. 51.082 459.738 ↑ 1.0 1 25,541

Aggregate (cost=77.63..77.64 rows=1 width=24) (actual time=0.017..0.018 rows=1 loops=25,541)

23. 90.541 408.656 ↓ 0.0 0 25,541

Nested Loop (cost=4.60..77.62 rows=2 width=24) (actual time=0.015..0.016 rows=0 loops=25,541)

24. 76.623 178.787 ↑ 2.0 1 25,541

Bitmap Heap Scan on t_resolution r (cost=4.31..15.92 rows=2 width=32) (actual time=0.006..0.007 rows=1 loops=25,541)

  • Recheck Cond: (parent_id = d.id)
  • Filter: ((NOT del_rec) AND controlling)
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=31764
25. 102.164 102.164 ↑ 1.5 2 25,541

Bitmap Index Scan on t_resolution_parent_id_idx (cost=0.00..4.31 rows=3 width=0) (actual time=0.004..0.004 rows=2 loops=25,541)

  • Index Cond: (parent_id = d.id)
26. 139.228 139.328 ↓ 0.0 0 34,832

Index Scan using t_resolution_task_parent_id_idx on t_resolution_task rt (cost=0.29..30.84 rows=1 width=56) (actual time=0.004..0.004 rows=0 loops=34,832)

  • Index Cond: (parent_id = r.id)
  • Filter: ((NOT del_rec) AND (COALESCE(prolongation_date, outer_limit, inner_limit) IS NOT NULL) AND (work_status <> ALL ('{7,13}'::integer[])) AND ((r.signer_enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid) OR (alternative (...)
  • Rows Removed by Filter: 1
27.          

SubPlan (forIndex Scan)

28. 0.100 0.100 ↓ 0.0 0 5

Index Scan using t_resolution_task_executer_parent_id_idx on t_resolution_task_executer rte (cost=0.42..44.64 rows=2 width=0) (actual time=0.020..0.020 rows=0 loops=5)

  • Index Cond: (parent_id = rt.id)
  • Filter: ((NOT del_rec) AND (work_status <> ALL ('{7,13}'::integer[])) AND (enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid))
  • Rows Removed by Filter: 4
29. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_resolution_task_executer rte_1 (cost=0.00..7,092.84 rows=40,256 width=16) (never executed)

  • Filter: ((NOT del_rec) AND (work_status <> ALL ('{7,13}'::integer[])) AND (enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid))
30. 25.541 255.410 ↑ 1.0 1 25,541

Aggregate (cost=77.68..77.69 rows=1 width=28) (actual time=0.010..0.010 rows=1 loops=25,541)

31. 58.041 229.869 ↓ 0.0 0 25,541

Nested Loop (cost=4.60..77.65 rows=2 width=28) (actual time=0.008..0.009 rows=0 loops=25,541)

32. 51.082 102.164 ↑ 2.0 1 25,541

Bitmap Heap Scan on t_resolution r_1 (cost=4.31..15.92 rows=2 width=48) (actual time=0.003..0.004 rows=1 loops=25,541)

  • Recheck Cond: (parent_id = d.id)
  • Filter: ((NOT del_rec) AND controlling)
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=31764
33. 51.082 51.082 ↑ 1.5 2 25,541

Bitmap Index Scan on t_resolution_parent_id_idx (cost=0.00..4.31 rows=3 width=0) (actual time=0.002..0.002 rows=2 loops=25,541)

  • Index Cond: (parent_id = d.id)
34. 69.629 69.664 ↓ 0.0 0 34,832

Index Scan using t_resolution_task_parent_id_idx on t_resolution_task rt_1 (cost=0.29..30.86 rows=1 width=60) (actual time=0.002..0.002 rows=0 loops=34,832)

  • Index Cond: (parent_id = r_1.id)
  • Filter: ((NOT del_rec) AND (COALESCE(prolongation_date, outer_limit, inner_limit) IS NOT NULL) AND (work_status <> ALL ('{7,13}'::integer[])) AND ((r_1.signer_enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid) OR (r_1.signe (...)
  • Rows Removed by Filter: 1
35.          

SubPlan (forIndex Scan)

36. 0.035 0.035 ↓ 0.0 0 5

Index Scan using t_resolution_task_executer_parent_id_idx on t_resolution_task_executer rte_2 (cost=0.42..44.66 rows=2 width=0) (actual time=0.007..0.007 rows=0 loops=5)

  • Index Cond: (parent_id = rt_1.id)
  • Filter: ((NOT del_rec) AND (work_status <> ALL ('{7,13}'::integer[])) AND ((enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid) OR (executer_id = '4b6d9709-a918-4dd0-9c49-da76632f87d3'::uuid)))
  • Rows Removed by Filter: 4
37. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_resolution_task_executer rte_3 (cost=0.00..7,593.81 rows=40,347 width=16) (never executed)

  • Filter: ((NOT del_rec) AND (work_status <> ALL ('{7,13}'::integer[])) AND ((enterprise_id = '3176cd78-0acf-467e-aa51-6cdc7960d0a6'::uuid) OR (executer_id = '4b6d9709-a918-4dd0-9c49-da76632f87d3'::uuid)))