explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xXg9

Settings
# exclusive inclusive rows x rows loops node
1. 0.004 118,927.956 ↑ 1.5 10 1

Limit (cost=1,801.55..2,127.20 rows=15 width=295) (actual time=118,926.866..118,927.956 rows=10 loops=1)

2. 0.066 118,927.952 ↑ 1.5 10 1

Result (cost=1,801.55..2,127.20 rows=15 width=295) (actual time=118,926.865..118,927.952 rows=10 loops=1)

3. 0.053 118,926.476 ↑ 1.5 10 1

Sort (cost=1,801.55..1,801.59 rows=15 width=207) (actual time=118,926.472..118,926.476 rows=10 loops=1)

  • Sort Key: ns.ntfn_id DESC
  • Sort Method: quicksort Memory: 27kB
4. 0.056 118,926.423 ↑ 1.5 10 1

Nested Loop Left Join (cost=13.11..1,801.26 rows=15 width=207) (actual time=94,887.200..118,926.423 rows=10 loops=1)

5. 0.025 118,926.297 ↑ 1.5 10 1

Nested Loop (cost=12.83..1,796.64 rows=15 width=173) (actual time=94,887.151..118,926.297 rows=10 loops=1)

6. 0.026 118,926.142 ↑ 1.5 10 1

Nested Loop (cost=12.40..1,788.96 rows=15 width=177) (actual time=94,887.087..118,926.142 rows=10 loops=1)

7. 0.030 118,925.996 ↑ 1.5 10 1

Nested Loop (cost=11.98..1,782.16 rows=15 width=155) (actual time=94,887.056..118,925.996 rows=10 loops=1)

  • Join Filter: (ns.dvc_id = dvc.dvc_id)
8. 0.025 118,925.706 ↑ 1.5 10 1

Nested Loop (cost=11.55..1,774.63 rows=15 width=157) (actual time=94,887.009..118,925.706 rows=10 loops=1)

9. 2.458 118,925.481 ↑ 1.5 10 1

Nested Loop (cost=11.12..1,723.14 rows=15 width=141) (actual time=94,886.964..118,925.481 rows=10 loops=1)

10. 4.154 4.328 ↓ 1.7 705 1

Bitmap Heap Scan on notifications_summary ns (cost=10.83..621.40 rows=404 width=85) (actual time=0.191..4.328 rows=705 loops=1)

  • Recheck Cond: ((min_when_created > '2019-09-11 01:12:00+00'::timestamp with time zone) AND (min_when_created < '2019-09-11 01:17:00+00'::timestamp with time zone))
  • Filter: ((audit_type)::text <> 'DELINKED'::text)
  • Rows Removed by Filter: 6
  • Heap Blocks: exact=79
11. 0.174 0.174 ↓ 3.5 1,495 1

Bitmap Index Scan on ns_min_when_created_idx (cost=0.00..10.73 rows=430 width=0) (actual time=0.174..0.174 rows=1,495 loops=1)

  • Index Cond: ((min_when_created > '2019-09-11 01:12:00+00'::timestamp with time zone) AND (min_when_created < '2019-09-11 01:17:00+00'::timestamp with time zone))
12. 118,918.695 118,918.695 ↓ 0.0 0 705

Index Scan using evs_pk on evs ev (cost=0.29..2.73 rows=1 width=64) (actual time=168.679..168.679 rows=0 loops=705)

  • Index Cond: (ev_id = ns.ev_id)
  • Filter: (company_id = '200025'::bigint)
  • Rows Removed by Filter: 1
13. 0.200 0.200 ↑ 1.0 1 10

Index Scan using recipients_pk on recipients dvc1 (cost=0.43..3.43 rows=1 width=16) (actual time=0.020..0.020 rows=1 loops=10)

  • Index Cond: (recipient_id = ns.dvc_id)
14. 0.260 0.260 ↑ 1.0 1 10

Index Scan using dvc_pk on dvc (cost=0.43..0.49 rows=1 width=22) (actual time=0.026..0.026 rows=1 loops=10)

  • Index Cond: (dvc_id = dvc1.recipient_id)
15. 0.120 0.120 ↑ 1.0 1 10

Index Scan using persons_pk on persons person (cost=0.42..0.45 rows=1 width=22) (actual time=0.012..0.012 rows=1 loops=10)

  • Index Cond: (person_id = dvc.person_id)
16. 0.130 0.130 ↑ 1.0 1 10

Index Scan using recipients_pk on recipients person1 (cost=0.43..0.51 rows=1 width=20) (actual time=0.013..0.013 rows=1 loops=10)

  • Index Cond: (recipient_id = dvc.person_id)
17. 0.070 0.070 ↑ 1.0 1 10

Index Scan using org_dvc_names_pk on org_dvc_names orgdvcname (cost=0.28..0.30 rows=1 width=18) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: (dvc1.org_dvc_name_id = org_dvc_name_id)
18.          

SubPlan (for Result)

19. 0.050 0.820 ↑ 1.0 1 10

Aggregate (cost=9.11..9.12 rows=1 width=32) (actual time=0.081..0.082 rows=1 loops=10)

20. 0.080 0.770 ↓ 0.0 0 10

Nested Loop (cost=0.99..9.11 rows=1 width=25) (actual time=0.068..0.077 rows=0 loops=10)

21. 0.200 0.200 ↑ 1.0 1 10

Index Scan using audit_evs_all_pk on audit_evs_all ne (cost=0.43..3.45 rows=1 width=8) (actual time=0.019..0.020 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
22. 0.490 0.490 ↓ 0.0 0 10

Index Scan using idx_audit_evs_all_anpni on audit_evs_all ne1 (cost=0.56..5.64 rows=1 width=33) (actual time=0.040..0.049 rows=0 loops=10)

  • Index Cond: (((ap_audit_ev_type)::text = ANY ('{CREATE_SUBSCRIPTION,CREATE_SUBSCRIPTION_WITH_DELAY}'::text[])) AND (ntfn_id = ne.root_ntfn_id))
23. 0.040 0.550 ↑ 1.0 1 10

Aggregate (cost=9.11..9.12 rows=1 width=32) (actual time=0.055..0.055 rows=1 loops=10)

24. 0.090 0.510 ↓ 0.0 0 10

Nested Loop (cost=0.99..9.11 rows=1 width=64) (actual time=0.043..0.051 rows=0 loops=10)

25. 0.070 0.070 ↑ 1.0 1 10

Index Scan using audit_evs_all_pk on audit_evs_all ne_1 (cost=0.43..3.45 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
26. 0.350 0.350 ↓ 0.0 0 10

Index Scan using idx_audit_evs_all_anpni on audit_evs_all ne1_1 (cost=0.56..5.64 rows=1 width=72) (actual time=0.028..0.035 rows=0 loops=10)

  • Index Cond: (((ap_audit_ev_type)::text = ANY ('{CREATE_SUBSCRIPTION,CREATE_SUBSCRIPTION_WITH_DELAY}'::text[])) AND (ntfn_id = ne_1.root_ntfn_id))
27. 0.040 0.040 ↑ 1.0 1 10

Index Scan using audit_evs_all_pk on audit_evs_all ne_2 (cost=0.43..3.45 rows=1 width=64) (actual time=0.004..0.004 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)