explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PFqH

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 4.209 ↑ 1.1 10 1

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

2. 0.024 3.602 ↑ 1.1 10 1

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

  • Sort Key: ns.ntfn_id DESC
  • Sort Method: quicksort Memory: 27kB
3. 0.016 3.578 ↑ 1.1 10 1

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

4. 0.008 3.522 ↑ 1.1 10 1

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

5. 0.011 3.444 ↑ 1.1 10 1

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

6. 0.011 3.373 ↑ 1.1 10 1

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

  • Join Filter: (ns.dvc_id = dvc.dvc_id)
7. 0.008 3.282 ↑ 1.1 10 1

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

8. 0.462 3.164 ↑ 1.1 10 1

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

9. 1.697 1.978 ↓ 2.6 724 1

Bitmap Heap Scan on notifications_summary ns (cost=7.95..434.31 rows=279 width=100) (actual time=0.344..1.978 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
10. 0.281 0.281 ↓ 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.280..0.281 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))
11. 0.724 0.724 ↓ 0.0 0 724

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

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

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

  • Index Cond: (recipient_id = ns.dvc_id)
13. 0.080 0.080 ↑ 1.0 1 10

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

  • Index Cond: (dvc_id = dvc1.recipient_id)
14. 0.060 0.060 ↑ 1.0 1 10

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

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

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

  • Index Cond: (recipient_id = dvc.person_id)
16. 0.040 0.040 ↑ 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.004..0.004 rows=1 loops=10)

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

SubPlan (forResult)

18. 0.020 0.310 ↑ 1.0 1 10

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

19. 0.040 0.290 ↓ 0.0 0 10

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

20. 0.050 0.050 ↑ 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.005..0.005 rows=1 loops=10)

  • Index Cond: (audit_ev_id = ns.create_audit_ev_id)
21. 0.200 0.200 ↓ 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.016..0.020 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))
22. 0.020 0.240 ↑ 1.0 1 10

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

23. 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)

24. 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)
25. 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))
26. 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 : 7.019 ms
Execution time : 4.469 ms