explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GR99

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

Hash Left Join (cost=1,727.10..1,015,457.54 rows=5,830 width=737) (actual time=72.933..3,266.699 rows=25,541 loops=1)

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

Nested Loop Left Join (cost=1,724.98..64,135.81 rows=5,830 width=721) (actual time=71.917..785.890 rows=25,541 loops=1)

3. 25.797 661.285 ↓ 4.4 25,541 1

Nested Loop (cost=1,724.56..61,456.16 rows=5,830 width=705) (actual time=71.867..661.285 rows=25,541 loops=1)

4. 14.693 482.242 ↓ 4.4 25,541 1

Hash Join (cost=1,724.13..32,487.92 rows=5,830 width=689) (actual time=71.837..482.242 rows=25,541 loops=1)

  • Hash Cond: (c.bo_type = cbot.id)
5. 12.874 467.518 ↓ 4.4 25,541 1

Nested Loop (cost=1,722.57..32,406.19 rows=5,830 width=691) (actual time=71.777..467.518 rows=25,541 loops=1)

6. 147.481 246.676 ↓ 4.4 25,996 1

Hash Join (cost=1,722.14..3,480.31 rows=5,907 width=642) (actual time=71.718..246.676 rows=25,996 loops=1)

  • Hash Cond: (c.parent_id = d.id)
7. 27.534 27.534 ↑ 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.013..27.534 rows=30,211 loops=1)

  • Filter: ((NOT del_rec) AND ((reg_number)::text <> ''::text))
  • Rows Removed by Filter: 18986
8. 24.609 71.661 ↓ 5.8 36,057 1

Hash (cost=1,644.56..1,644.56 rows=6,206 width=549) (actual time=71.661..71.661 rows=36,057 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4122kB
9. 32.011 47.052 ↓ 5.8 36,057 1

Hash Join (cost=1.38..1,644.56 rows=6,206 width=549) (actual time=0.089..47.052 rows=36,057 loops=1)

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

Seq Scan on t_document d (cost=0.00..1,387.18 rows=51,718 width=35) (actual time=0.013..15.021 rows=51,731 loops=1)

11. 0.004 0.020 ↑ 1.0 3 1

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

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

Seq Scan on t_business_object_types dbot (cost=0.00..1.34 rows=3 width=518) (actual time=0.008..0.016 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. 207.968 207.968 ↑ 1.0 1 25,996

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

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
15. 0.015 0.015 ↑ 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.015 rows=25 loops=1)

16. 153.246 153.246 ↑ 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.006 rows=1 loops=25,541)

  • Index Cond: (id = c.id)
17. 102.164 102.164 ↓ 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.004..0.004 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. 229.869 229.869 ↑ 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.009..0.009 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. 25.541 383.115 ↑ 1.0 1 25,541

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

23. 99.832 357.574 ↓ 0.0 0 25,541

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

24. 51.082 153.246 ↑ 2.0 1 25,541

Bitmap Heap Scan on t_resolution r (cost=4.31..15.92 rows=2 width=32) (actual time=0.005..0.006 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=31763
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. 104.391 104.496 ↓ 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.003..0.003 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.105 0.105 ↓ 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.021..0.021 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. 51.082 229.869 ↑ 1.0 1 25,541

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

31. 32.500 178.787 ↓ 0.0 0 25,541

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

32. 25.541 76.623 ↑ 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.003 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=31763
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)))