explain.depesz.com

PostgreSQL's explain analyze made readable

Result: mR2y

Settings
# exclusive inclusive rows x rows loops node
1. 1,778.626 3,693.907 ↓ 4.4 25,539 1

Hash Left Join (cost=1,974.35..1,014,474.74 rows=5,819 width=737) (actual time=39.419..3,693.907 rows=25,539 loops=1)

  • Hash Cond: (doc.id = fav.business_object_id)
2. 8.194 893.704 ↓ 4.4 25,539 1

Nested Loop Left Join (cost=1,972.51..64,956.03 rows=5,819 width=721) (actual time=39.026..893.704 rows=25,539 loops=1)

3. 30.747 732.276 ↓ 4.4 25,539 1

Nested Loop (cost=1,972.09..62,281.53 rows=5,819 width=705) (actual time=39.007..732.276 rows=25,539 loops=1)

4. 17.737 522.756 ↓ 4.4 25,539 1

Hash Join (cost=1,971.66..33,350.39 rows=5,819 width=689) (actual time=38.989..522.756 rows=25,539 loops=1)

  • Hash Cond: (c.bo_type = cbot.id)
5. 18.123 504.990 ↓ 4.4 25,539 1

Nested Loop (cost=1,970.10..33,268.82 rows=5,819 width=691) (actual time=38.932..504.990 rows=25,539 loops=1)

6. 185.715 252.921 ↓ 4.4 25,994 1

Hash Join (cost=1,969.67..4,397.05 rows=5,895 width=642) (actual time=38.900..252.921 rows=25,994 loops=1)

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

Seq Scan on t_card c (cost=0.00..2,184.19 rows=49,127 width=93) (actual time=0.010..28.351 rows=30,209 loops=1)

  • Filter: ((NOT del_rec) AND ((reg_number)::text <> ''::text))
  • Rows Removed by Filter: 18974
8. 12.446 38.855 ↓ 5.8 36,047 1

Hash (cost=1,892.13..1,892.13 rows=6,203 width=549) (actual time=38.855..38.855 rows=36,047 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4121kB
9. 16.302 26.409 ↓ 5.8 36,047 1

Hash Join (cost=1.38..1,892.13 rows=6,203 width=549) (actual time=0.051..26.409 rows=36,047 loops=1)

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

Seq Scan on t_document d (cost=0.00..1,634.89 rows=51,689 width=35) (actual time=0.003..10.083 rows=51,717 loops=1)

11. 0.009 0.024 ↑ 1.0 3 1

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

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

Seq Scan on t_business_object_types dbot (cost=0.00..1.34 rows=3 width=518) (actual time=0.006..0.015 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. 233.946 233.946 ↑ 1.0 1 25,994

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

  • Index Cond: (id = d.id)
  • Filter: ((NOT d.is_duplicate) OR del_rec)
  • Rows Removed by Filter: 0
14. 0.008 0.029 ↑ 1.0 25 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
15. 0.021 0.021 ↑ 1.0 25 1

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

16. 178.773 178.773 ↑ 1.0 1 25,539

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

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

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

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

Hash (cost=1.83..1.83 rows=1 width=16) (actual time=0.017..0.017 rows=0 loops=1)

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

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

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

SubPlan (forHash Left Join)

21. 306.468 306.468 ↑ 12.0 1 25,539

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.012..0.012 rows=1 loops=25,539)

  • 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. 25.539 459.702 ↑ 1.0 1 25,539

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

23. 81.270 434.163 ↓ 0.0 0 25,539

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

24. 76.617 178.773 ↑ 2.0 1 25,539

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

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

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,539)

  • Index Cond: (parent_id = d.id)
26. 174.010 174.120 ↓ 0.0 0 34,824

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.005..0.005 rows=0 loops=34,824)

  • 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.110 0.110 ↓ 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.022..0.022 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.539 255.390 ↑ 1.0 1 25,539

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

31. 58.047 229.851 ↓ 0.0 0 25,539

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

32. 51.078 102.156 ↑ 2.0 1 25,539

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,539)

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

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,539)

  • Index Cond: (parent_id = d.id)
34. 69.588 69.648 ↓ 0.0 0 34,824

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,824)

  • 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.060 0.060 ↓ 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.012..0.012 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)))