explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wnSk

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 5.274 ↑ 1.1 10 1

Limit (cost=1,199.32..1,438.24 rows=11 width=309) (actual time=4.688..5.274 rows=10 loops=1)

2. 0.033 5.271 ↑ 1.1 10 1

Result (cost=1,199.32..1,438.24 rows=11 width=309) (actual time=4.688..5.271 rows=10 loops=1)

3. 0.065 4.328 ↑ 1.1 10 1

Sort (cost=1,199.32..1,199.35 rows=11 width=221) (actual time=4.326..4.328 rows=10 loops=1)

  • Sort Key: ns.ntfn_id DESC
  • Sort Method: quicksort Memory: 27kB
4. 0.027 4.263 ↑ 1.1 10 1

Nested Loop Left Join (cost=10.24..1,199.13 rows=11 width=221) (actual time=2.370..4.263 rows=10 loops=1)

5. 0.008 4.156 ↑ 1.1 10 1

Nested Loop (cost=9.96..1,195.75 rows=11 width=187) (actual time=2.320..4.156 rows=10 loops=1)

6. 0.015 4.068 ↑ 1.1 10 1

Nested Loop (cost=9.53..1,190.12 rows=11 width=191) (actual time=2.286..4.068 rows=10 loops=1)

7. 0.017 3.953 ↑ 1.1 10 1

Nested Loop (cost=9.10..1,185.13 rows=11 width=169) (actual time=2.230..3.953 rows=10 loops=1)

  • Join Filter: (ns.dvc_id = dvc.dvc_id)
8. 0.014 3.716 ↑ 1.1 10 1

Nested Loop (cost=8.67..1,179.61 rows=11 width=171) (actual time=2.181..3.716 rows=10 loops=1)

9. 0.000 3.492 ↑ 1.1 10 1

Nested Loop (cost=8.24..1,141.81 rows=11 width=155) (actual time=2.125..3.492 rows=10 loops=1)

10. 1.851 2.219 ↓ 2.6 724 1

Bitmap Heap Scan on notifications_summary ns (cost=7.95..434.31 rows=279 width=100) (actual time=0.406..2.219 rows=724 loops=1)

  • Recheck Cond: ((min_when_created > '2019-09-10 18:12:29-07'::timestamp with time zone) AND (min_when_created < '2019-09-10 18:17:29-07'::timestamp with time zone))
  • Filter: ((audit_type)::text <> 'DELINKED'::text)
  • Rows Removed by Filter: 6
  • Heap Blocks: exact=76
11. 0.368 0.368 ↓ 5.9 1,755 1

Bitmap Index Scan on ns_min_when_created_idx (cost=0.00..7.88 rows=296 width=0) (actual time=0.368..0.368 rows=1,755 loops=1)

  • Index Cond: ((min_when_created > '2019-09-10 18:12:29-07'::timestamp with time zone) AND (min_when_created < '2019-09-10 18:17:29-07'::timestamp with time zone))
12. 1.448 1.448 ↓ 0.0 0 724

Index Scan using evs_pk on evs ev (cost=0.29..2.54 rows=1 width=63) (actual time=0.002..0.002 rows=0 loops=724)

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

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

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

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

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

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

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

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

  • Index Cond: (recipient_id = dvc.person_id)
17. 0.080 0.080 ↑ 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.008..0.008 rows=1 loops=10)

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

SubPlan (forResult)

19. 0.020 0.650 ↑ 1.0 1 10

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

20. 0.030 0.630 ↓ 0.0 0 10

Nested Loop (cost=0.99..9.11 rows=3 width=25) (actual time=0.056..0.063 rows=0 loops=10)

21. 0.260 0.260 ↑ 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.026..0.026 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
22. 0.340 0.340 ↓ 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.026..0.034 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.010 0.230 ↑ 1.0 1 10

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

24. 0.030 0.220 ↓ 0.0 0 10

Nested Loop (cost=0.99..9.11 rows=3 width=65) (actual time=0.019..0.022 rows=0 loops=10)

25. 0.030 0.030 ↑ 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.003..0.003 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
26. 0.160 0.160 ↓ 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=73) (actual time=0.013..0.016 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.030 0.030 ↑ 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=65) (actual time=0.003..0.003 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
Planning time : 20.474 ms
Execution time : 5.797 ms