explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G4Ds

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.091 ↓ 0.0 0 1

Limit (cost=83.27..83.31 rows=1 width=586) (actual time=0.091..0.091 rows=0 loops=1)

  • Buffers: shared hit=36
2. 0.001 0.091 ↓ 0.0 0 1

GroupAggregate (cost=83.24..83.27 rows=1 width=586) (actual time=0.091..0.091 rows=0 loops=1)

  • Group Key: dl.highrisk, dl.createdat, l.linkid, d.url, (COALESCE(cfg.icon, mcfg.icon)), (COALESCE(cfg.channelid, mcfg.channelid)), a.assetid, i.incidentstatusid
  • Buffers: shared hit=36
3. 0.009 0.090 ↓ 0.0 0 1

Sort (cost=83.24..83.24 rows=1 width=586) (actual time=0.09..0.09 rows=0 loops=1)

  • Sort Key: dl.highrisk DESC, dl.createdat, l.linkid, d.url, (COALESCE(cfg.icon, mcfg.icon)), (COALESCE(cfg.channelid, mcfg.channelid)), a.assetid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=36
4. 0.001 0.081 ↓ 0.0 0 1

Nested Loop (cost=5.01..83.23 rows=1 width=586) (actual time=0.081..0.081 rows=0 loops=1)

  • Filter: (((c.customerdivisionid IS NOT NULL) AND (dc.domainid IS NOT NULL) AND (cc.scopeid IS NOT NULL) AND (ccd.contractid IS NOT NULL)) OR (c.customerdivisionid IS NULL))
  • Buffers: shared hit=36
5. 0.000 0.080 ↓ 0.0 0 1

Nested Loop (cost=4.86..82.74 rows=1 width=198) (actual time=0.08..0.08 rows=0 loops=1)

  • Buffers: shared hit=36
6. 0.000 0.080 ↓ 0.0 0 1

Nested Loop (cost=4.72..81.68 rows=1 width=198) (actual time=0.08..0.08 rows=0 loops=1)

  • Buffers: shared hit=36
7. 0.000 0.080 ↓ 0.0 0 1

Nested Loop (cost=4.58..81.51 rows=1 width=198) (actual time=0.08..0.08 rows=0 loops=1)

  • Buffers: shared hit=36
8. 0.000 0.080 ↓ 0.0 0 1

Nested Loop (cost=4.44..73.34 rows=1 width=198) (actual time=0.08..0.08 rows=0 loops=1)

  • Buffers: shared hit=36
9. 0.001 0.080 ↓ 0.0 0 1

Nested Loop (cost=4.15..67.2 rows=1 width=144) (actual time=0.08..0.08 rows=0 loops=1)

  • Buffers: shared hit=36
10. 0.000 0.079 ↓ 0.0 0 1

Nested Loop (cost=3.86..66.78 rows=1 width=148) (actual time=0.079..0.079 rows=0 loops=1)

  • Buffers: shared hit=36
11. 0.000 0.079 ↓ 0.0 0 1

Nested Loop (cost=3.57..66.42 rows=1 width=90) (actual time=0.079..0.079 rows=0 loops=1)

  • Filter: ((cl.linkid IS NULL) OR cl.hasminimumdata)
  • Buffers: shared hit=36
12. 0.000 0.079 ↓ 0.0 0 1

Nested Loop (cost=3.13..57.94 rows=1 width=98) (actual time=0.079..0.079 rows=0 loops=1)

  • Buffers: shared hit=36
13. 0.000 0.079 ↓ 0.0 0 1

Nested Loop (cost=2.7..55.65 rows=1 width=93) (actual time=0.079..0.079 rows=0 loops=1)

  • Buffers: shared hit=36
14. 0.000 0.079 ↓ 0.0 0 1

Nested Loop (cost=2.41..55.33 rows=1 width=65) (actual time=0.079..0.079 rows=0 loops=1)

  • Buffers: shared hit=36
15. 0.001 0.079 ↓ 0.0 0 1

Nested Loop (cost=2.12..55.02 rows=1 width=73) (actual time=0.079..0.079 rows=0 loops=1)

  • Buffers: shared hit=36
16. 0.000 0.078 ↓ 0.0 0 1

Nested Loop (cost=1.85..46.71 rows=1 width=73) (actual time=0.078..0.078 rows=0 loops=1)

  • Buffers: shared hit=36
17. 0.000 0.078 ↓ 0.0 0 1

Nested Loop (cost=1.56..46.39 rows=1 width=65) (actual time=0.078..0.078 rows=0 loops=1)

  • Buffers: shared hit=36
18. 0.000 0.078 ↓ 0.0 0 1

Nested Loop (cost=1.12..37.92 rows=1 width=49) (actual time=0.078..0.078 rows=0 loops=1)

  • Buffers: shared hit=36
19. 0.008 0.078 ↓ 0.0 0 1

Nested Loop (cost=0.85..29.61 rows=1 width=41) (actual time=0.078..0.078 rows=0 loops=1)

  • Buffers: shared hit=36
20. 0.022 0.022 ↓ 4.0 8 1

Index Scan using idx_asset_customer on asset a (cost=0.28..12.41 rows=2 width=21) (actual time=0.018..0.022 rows=8 loops=1)

  • Index Cond: (a.customerid = 594)
  • Filter: a.active
  • Buffers: shared hit=4
21. 0.048 0.048 ↓ 0.0 0 8

Index Scan using incident__index1 on incident i (cost=0.56..8.59 rows=1 width=20) (actual time=0.006..0.006 rows=0 loops=8)

  • Index Cond: ((i.customerid = 594) AND (i.contractid = 614) AND (i.assetid = a.assetid) AND (i.incidentstatusid = 5) AND (i.enforcementlevelid = 8))
  • Buffers: shared hit=32
22. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pk_contract on contract co (cost=0.28..8.29 rows=1 width=8) (never executed)

  • Index Cond: (co.contractid = 614)
  • Filter: co.active
23. 0.000 0.000 ↓ 0.0 0 0

Index Scan using uq_link_linkid_linktypeid on link l (cost=0.44..8.46 rows=1 width=16) (never executed)

  • Index Cond: ((l.linkid = i.detectionlinkid) AND (l.linktypeid = 1))
  • Filter: (l.hasminimumdata AND (NOT l.deleted) AND (l.customerid = 594) AND (l.enforcementstatusid = 6) AND (i.assetid = l.assetid))
24. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using uq_asset_scope on asset_scope ascope (cost=0.29..0.31 rows=1 width=8) (never executed)

  • Index Cond: ((ascope.assetid = l.assetid) AND (ascope.scopeid = 1))
25. 0.000 0.000 ↓ 0.0 0 0

Index Only Scan using pk_scope on scope scope (cost=0.28..8.29 rows=1 width=0) (never executed)

  • Index Cond: (scope.scopeid = 1)
26. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_contract_asset__asset on contract_asset coa (cost=0.28..0.3 rows=1 width=4) (never executed)

  • Index Cond: (coa.assetid = l.assetid)
  • Filter: (coa.contractid = 614)
27. 0.000 0.000 ↓ 0.0 0 0

Index Scan using uq_domain_domainid_domaintypeid on domain d (cost=0.29..0.32 rows=1 width=32) (never executed)

  • Index Cond: (d.domainid = l.domainid)
  • Filter: d.active
28. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_detection_link on detectionlink dl (cost=0.43..2.29 rows=1 width=13) (never executed)

  • Index Cond: ((dl.detectionlinkid = l.linkid) AND (dl.linktypeid = 1))
29. 0.000 0.000 ↓ 0.0 0 0

Index Scan using uq_link_linkid_linktypeid on link cl (cost=0.44..8.46 rows=1 width=9) (never executed)

  • Index Cond: ((cl.linkid = i.contentlinkid) AND (cl.linktypeid = 2))
  • Filter: ((NOT cl.deleted) AND (cl.customerid = 594))
30. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pk_domainconfiguration on domainconfiguration cfg (cost=0.29..0.37 rows=1 width=62) (never executed)

  • Index Cond: (cfg.domainconfigurationid = d.domainconfigurationid)
31. 0.000 0.000 ↓ 0.0 0 0

Index Scan using uq_domain_domainid_domaintypeid on domain md (cost=0.29..0.4 rows=1 width=8) (never executed)

  • Index Cond: (md.domainid = d.masterdomainid)
  • Filter: (md.hierarchylevelid = 1)
32. 0.000 0.000 ↓ 0.0 0 0

Index Scan using pk_domainconfiguration on domainconfiguration mcfg (cost=0.29..6.15 rows=1 width=62) (never executed)

  • Index Cond: (mcfg.domainconfigurationid = md.domainconfigurationid)
33. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_customerdivision_customer on customerdivision c (cost=0.14..8.16 rows=1 width=8) (never executed)

  • Index Cond: (c.customerid = co.customerid)
34. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_domaincustomerdivision_domain on domain_customerdivision dc (cost=0.14..0.16 rows=1 width=8) (never executed)

  • Index Cond: (d.domainid = dc.domainid)
35. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_contractcustomerdivision_customerdivision on contract_customerdivision ccd (cost=0.14..1.04 rows=1 width=8) (never executed)

  • Index Cond: (ccd.customerdivisionid = c.customerdivisionid)
  • Filter: (ccd.contractid = 614)
36. 0.000 0.000 ↓ 0.0 0 0

Index Scan using idx_customerdivisionscope_scope on customerdivision_scope cc (cost=0.15..0.36 rows=10 width=8) (never executed)

  • Index Cond: ((cc.scopeid = ascope.scopeid) AND (cc.scopeid = 1))
Planning time : 87.483 ms
Execution time : 0.325 ms