explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WH6e

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.045 ↓ 0.0 0 1

Nested Loop (cost=1,978.37..57,911.46 rows=1 width=561) (actual time=0.045..0.045 rows=0 loops=1)

2. 0.002 0.043 ↓ 0.0 0 1

Nested Loop (cost=1,977.95..45,745.60 rows=1 width=513) (actual time=0.043..0.043 rows=0 loops=1)

3. 0.002 0.041 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,977.66..45,737.49 rows=1 width=487) (actual time=0.041..0.041 rows=0 loops=1)

4. 0.002 0.039 ↓ 0.0 0 1

Nested Loop (cost=1,977.24..45,729.04 rows=1 width=471) (actual time=0.039..0.039 rows=0 loops=1)

5. 0.001 0.037 ↓ 0.0 0 1

Nested Loop (cost=1,976.96..45,720.74 rows=1 width=459) (actual time=0.037..0.037 rows=0 loops=1)

6. 0.002 0.036 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,976.82..45,716.57 rows=1 width=455) (actual time=0.036..0.036 rows=0 loops=1)

  • Join Filter: (uat_account.acc_dvcid = uat_device.dvc_id)
7. 0.002 0.034 ↓ 0.0 0 1

Nested Loop (cost=1,968.23..45,704.87 rows=1 width=429) (actual time=0.034..0.034 rows=0 loops=1)

8. 0.002 0.032 ↓ 0.0 0 1

Nested Loop (cost=1,967.95..45,697.23 rows=1 width=418) (actual time=0.032..0.032 rows=0 loops=1)

9. 0.002 0.030 ↓ 0.0 0 1

Nested Loop (cost=1,967.67..45,688.92 rows=1 width=388) (actual time=0.030..0.030 rows=0 loops=1)

10. 0.002 0.028 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,967.25..45,680.47 rows=1 width=357) (actual time=0.028..0.028 rows=0 loops=1)

11. 0.002 0.026 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,966.83..45,672.18 rows=1 width=323) (actual time=0.026..0.026 rows=0 loops=1)

12. 0.001 0.024 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,966.25..45,652.94 rows=1 width=280) (actual time=0.024..0.024 rows=0 loops=1)

13. 0.003 0.023 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,965.83..45,644.65 rows=1 width=246) (actual time=0.023..0.023 rows=0 loops=1)

14. 0.020 0.020 ↓ 0.0 0 1

Index Scan using idx_lgr_rev_svcid_dvcid on uat_log_revalidation cbn_log_encerramento (cost=0.57..43,671.33 rows=1 width=170) (actual time=0.020..0.020 rows=0 loops=1)

  • Index Cond: ((lgr_dvcid = '414802'::numeric) AND (lgr_rev_svcid = '53'::numeric))
  • Filter: (((lgr_business_need)::text = ANY ('{"Business Need Rejected - Positive Confirmation","Business Need Approved - Exhausted Escalation Process"}'::text[])) AND (lgr_date >= '2019-10-01'::date) AND (lgr_date <= '2019-10-02'::date) AND ((lgr_action)::text = 'Revalidation Finished'::text))
15. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation cbn_log_encerramento_manager (cost=1,965.26..1,973.31 rows=1 width=110) (never executed)

  • Recheck Cond: ((lgr_dvcid = '414802'::numeric) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_responsable_role_type)::text = 'Manager'::text) AND ((lgr_action)::text = 'Revalidation Finished'::text) AND (lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND ((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text))
16. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=1,965.26..1,965.26 rows=2 width=0) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..627.47 rows=22,786 width=0) (never executed)

  • Index Cond: (lgr_dvcid = '414802'::numeric)
18. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_emp_cnum on uat_emp manager (cost=0.42..8.28 rows=1 width=54) (never executed)

  • Index Cond: ((emp_cnum)::text = (cbn_log_encerramento_manager.lgr_responsable_role_owner_cnum)::text)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_lgr_ticket on uat_log_revalidation cbn_log_encerramento_owner (cost=0.57..19.23 rows=1 width=77) (never executed)

  • Index Cond: ((lgr_ticket = cbn_log_encerramento.lgr_ticket) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: ((lgr_dvcid = '414802'::numeric) AND ((lgr_responsable_role_type)::text = 'Privilege Owner'::text) AND ((lgr_action)::text = 'Revalidation Finished'::text) AND (lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND ((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text))
21. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_emp_cnum on uat_emp privilege_owner (cost=0.42..8.28 rows=1 width=54) (never executed)

  • Index Cond: ((emp_cnum)::text = (cbn_log_encerramento_owner.lgr_responsable_role_owner_cnum)::text)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_dvc_id on uat_device (cost=0.42..8.44 rows=1 width=31) (never executed)

  • Index Cond: (dvc_id = '414802'::numeric)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_cus_env_id on uat_cus_environment (cost=0.28..8.30 rows=1 width=40) (never executed)

  • Index Cond: (cus_env_id = uat_device.dvc_cusenvid)
24. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_cus_id on uat_customer (cost=0.28..7.63 rows=1 width=21) (never executed)

  • Index Cond: (cus_id = uat_cus_environment.cus_env_cusid)
25. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=8.59..11.69 rows=1 width=48) (never executed)

  • Hash Cond: (acc_status.sts_id = uat_account.acc_device_stsid)
26. 0.000 0.000 ↓ 0.0 0

Seq Scan on uat_status acc_status (cost=0.00..2.79 rows=79 width=29) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Hash (cost=8.58..8.58 rows=1 width=28) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_dvcid_username on uat_account (cost=0.56..8.58 rows=1 width=28) (never executed)

  • Index Cond: ((acc_dvcid = '414802'::numeric) AND ((cbn_log_encerramento.lgr_userid)::text = (acc_username)::text))
29. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_ctr_id on uat_country (cost=0.14..4.16 rows=1 width=14) (never executed)

  • Index Cond: (ctr_id = uat_cus_environment.cus_env_ctrid)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_pla_id on uat_platform (cost=0.27..8.29 rows=1 width=22) (never executed)

  • Index Cond: (pla_id = uat_device.dvc_plaid)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_emp_cnum on uat_emp user_owner (cost=0.42..8.44 rows=1 width=36) (never executed)

  • Index Cond: ((emp_cnum)::text = (cbn_log_encerramento.lgr_userid_role_owner_cnum)::text)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_rolid on uat_role role_dpe (cost=0.29..8.10 rows=1 width=38) (never executed)

  • Index Cond: (rol_id = uat_cus_environment.cus_env_rolid)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_emp_id on uat_emp dpe (cost=0.42..8.27 rows=1 width=60) (never executed)

  • Index Cond: (emp_id = role_dpe.rol_owner_empid)
34.          

SubPlan (for Nested Loop)

35. 0.000 0.000 ↓ 0.0 0

Limit (cost=2,214.38..2,214.39 rows=1 width=4) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,214.38..2,214.39 rows=1 width=4) (never executed)

  • Sort Key: log_inicio.lgr_date
37. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation log_inicio (cost=2,206.33..2,214.37 rows=1 width=4) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_action)::text = 'Starting Revalidation'::text))
38. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=2,206.33..2,206.33 rows=2 width=0) (never executed)

39. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..868.95 rows=31,516 width=0) (never executed)

  • Index Cond: (lgr_dvcid = cbn_log_encerramento.lgr_dvcid)
40. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
41. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation cbn_manager_action (cost=1,426.26..1,430.29 rows=1 width=33) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '57'::numeric) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_responsable_role_type)::text = 'Manager'::text))
42. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=1,426.26..1,426.26 rows=1 width=0) (never executed)

43. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..88.88 rows=2,830 width=0) (never executed)

  • Index Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '57'::numeric))
44. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_lgr_rev_svcid_dvcid on uat_log_revalidation cbn_manager_action_1 (cost=0.57..215.48 rows=1 width=33) (never executed)

  • Index Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '58'::numeric))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_responsable_role_type)::text = 'Manager'::text))
46. 0.000 0.000 ↓ 0.0 0

Limit (cost=2,214.38..2,214.39 rows=1 width=10) (never executed)

47. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,214.38..2,214.39 rows=1 width=10) (never executed)

  • Sort Key: (CASE WHEN ((log_inicio_1.lgr_responsable_role_owner_cnum)::text <> (cbn_log_encerramento.lgr_responsable_role_owner_cnum)::text) THEN true ELSE false END)
48. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation log_inicio_1 (cost=2,206.33..2,214.37 rows=1 width=10) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_action)::text = 'Starting Revalidation'::text))
49. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=2,206.33..2,206.33 rows=2 width=0) (never executed)

50. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..868.95 rows=31,516 width=0) (never executed)

  • Index Cond: (lgr_dvcid = cbn_log_encerramento.lgr_dvcid)
51. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
52. 0.000 0.000 ↓ 0.0 0

Limit (cost=2,214.39..2,214.39 rows=1 width=23) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,214.39..2,214.39 rows=1 width=23) (never executed)

  • Sort Key: log_inicio_2.lgr_responsable_role_owner_name
54. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation log_inicio_2 (cost=2,206.33..2,214.38 rows=1 width=23) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_action)::text = 'Starting Revalidation'::text) AND ((lgr_responsable_role_type)::text = 'Privilege Owner'::text))
55. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=2,206.33..2,206.33 rows=2 width=0) (never executed)

56. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..868.95 rows=31,516 width=0) (never executed)

  • Index Cond: (lgr_dvcid = cbn_log_encerramento.lgr_dvcid)
57. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
58. 0.000 0.000 ↓ 0.0 0

Limit (cost=2,222.84..2,222.84 rows=1 width=20) (never executed)

59. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,222.84..2,222.84 rows=1 width=20) (never executed)

  • Sort Key: privilege_old_owner.emp_mail
60. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=2,206.75..2,222.83 rows=1 width=20) (never executed)

61. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation log_inicio_3 (cost=2,206.33..2,214.38 rows=1 width=10) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_action)::text = 'Starting Revalidation'::text) AND ((lgr_responsable_role_type)::text = 'Privilege Owner'::text))
62. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=2,206.33..2,206.33 rows=2 width=0) (never executed)

63. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..868.95 rows=31,516 width=0) (never executed)

  • Index Cond: (lgr_dvcid = cbn_log_encerramento.lgr_dvcid)
64. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_emp_cnum on uat_emp privilege_old_owner (cost=0.42..8.44 rows=1 width=30) (never executed)

  • Index Cond: ((emp_cnum)::text = (log_inicio_3.lgr_responsable_role_owner_cnum)::text)
66. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on uat_log_revalidation cbn_owner_action (cost=1,426.26..1,430.29 rows=1 width=33) (never executed)

  • Recheck Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '57'::numeric) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_responsable_role_type)::text = 'Privilege Owner'::text))
67. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=1,426.26..1,426.26 rows=1 width=0) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_rev_svcid_dvcid (cost=0.00..88.88 rows=2,830 width=0) (never executed)

  • Index Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '57'::numeric))
69. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_lgr_ticket (cost=0.00..1,337.13 rows=58,741 width=0) (never executed)

  • Index Cond: (lgr_ticket = cbn_log_encerramento.lgr_ticket)
70. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_lgr_rev_svcid_dvcid on uat_log_revalidation cbn_owner_action_1 (cost=0.57..215.48 rows=1 width=33) (never executed)

  • Index Cond: ((lgr_dvcid = cbn_log_encerramento.lgr_dvcid) AND (lgr_rev_svcid = '58'::numeric))
  • Filter: (((lgr_userid)::text = (cbn_log_encerramento.lgr_userid)::text) AND (lgr_ticket = cbn_log_encerramento.lgr_ticket) AND ((lgr_privilege)::text = (cbn_log_encerramento.lgr_privilege)::text) AND ((lgr_responsable_role_type)::text = 'Privilege Owner'::text))
Planning time : 9.920 ms
Execution time : 0.563 ms