explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jUo5

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 1,664.883 ↓ 40.0 40 1

Limit (cost=23,517.85..23,517.93 rows=1 width=4,238) (actual time=1,664.854..1,664.883 rows=40 loops=1)

2.          

CTE data

3. 6.562 1,538.395 ↓ 11,868.0 11,868 1

Unique (cost=23,495.76..23,495.83 rows=1 width=381) (actual time=1,530.920..1,538.395 rows=11,868 loops=1)

4. 10.078 1,531.833 ↓ 11,868.0 11,868 1

Sort (cost=23,495.76..23,495.76 rows=1 width=381) (actual time=1,530.918..1,531.833 rows=11,868 loops=1)

  • Sort Key: i.incidentid, a.assetid, a.name, i.createdat, ielh.setat, ish.setat, pt.protectiontypeid, i.incidentstatusid, i.enforcementlevelid, d_2.domainid, d_2.url, dl.highrisk, (CASE WHEN (dlw.detectionlinkwatcherid IS NOT NULL) THEN true ELSE false END), l.url, les.enforcementstatusid, lesh_5.setat, cl.url, cles.enforcementstatusid, clesh.setat, sl.url, sles.enforcementstatusid, slesh.setat, el.url, eles.enforcementstatusid, elesh.setat, tdl.url, tdles.enforcementstatusid, tdlesh.setat
  • Sort Method: quicksort Memory: 3520kB
5. 13.737 1,521.755 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=6.09..23,495.75 rows=1 width=381) (actual time=23.161..1,521.755 rows=11,868 loops=1)

  • Filter: (((cd.customerdivisionid IS NOT NULL) AND (dcd.domainid IS NOT NULL) AND (cc.scopeid IS NOT NULL) AND (ccd.contractid IS NOT NULL)) OR (cd.customerdivisionid IS NULL))
6. 15.413 1,508.018 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.94..23,487.56 rows=1 width=396) (actual time=23.144..1,508.018 rows=11,868 loops=1)

  • Join Filter: ((c.contractid = ccd.contractid) AND (ccd.customerdivisionid = cd.customerdivisionid))
7. 5.352 1,492.605 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.79..23,479.39 rows=1 width=396) (actual time=23.127..1,492.605 rows=11,868 loops=1)

  • Join Filter: ((d_2.domainid = dcd.domainid) AND (dcd.customerdivisionid = cd.customerdivisionid))
8. 17.451 1,487.253 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.79..23,467.64 rows=1 width=392) (actual time=23.124..1,487.253 rows=11,868 loops=1)

  • Join Filter: (cd.customerid = c.customerid)
  • Filter: ((public.parseintarg(NULL::bytea) IS NULL) OR (cd.customerdivisionid = public.parseintarg(NULL::bytea)))
9. 49.697 1,457.934 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.66..23,458.97 rows=1 width=392) (actual time=23.109..1,457.934 rows=11,868 loops=1)

  • Filter: (((public.parsedatearg(NULL::bytea) IS NULL) OR (ish.setat >= public.parsedatearg(NULL::bytea))) AND ((public.parsedatearg(NULL::bytea) IS NULL) OR (ish.setat < public.parsedatearg(NULL::bytea))))
10. 23.531 1,384.501 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.23..23,440.96 rows=1 width=384) (actual time=23.088..1,384.501 rows=11,868 loops=1)

  • Join Filter: (dlw.detectionlinkid = dl.detectionlinkid)
  • Filter: ((public.parseboolarg(NULL::bytea) IS NULL) OR ((public.parseboolarg(NULL::bytea) IS TRUE) AND (dlw.detectionlinkwatcherid IS NOT NULL)) OR ((public.parseboolarg(NULL::bytea) IS FALSE) AND (dlw.detectionlinkwatcherid IS NULL)))
11. 12.817 1,349.102 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=5.23..23,439.02 rows=1 width=384) (actual time=23.078..1,349.102 rows=11,868 loops=1)

  • Join Filter: (tdlesh.enforcementstatusid = l.enforcementstatusid)
12. 36.545 1,336.285 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=4.80..23,426.06 rows=1 width=384) (actual time=23.068..1,336.285 rows=11,868 loops=1)

  • Join Filter: (tdles.enforcementstatusid = tdl.enforcementstatusid)
  • Rows Removed by Join Filter: 118091
  • Filter: (((public.buildintarray(NULL::bytea) IS NULL) OR (les.enforcementstatusid = ANY (public.buildintarray(NULL::bytea))) OR (cles.enforcementstatusid = ANY (public.buildintarray(NULL::bytea))) OR (sles.enforcementstatusid = ANY (public.buildintarray(NULL::bytea))) OR (eles.enforcementstatusid = ANY (public.buildintarray(NULL::bytea))) OR (tdles.enforcementstatusid = ANY (public.buildintarray(NULL::bytea)))) AND ((public.buildintarray(NULL::bytea) IS NULL) OR (les.enforcementstatusgroupid = ANY (public.buildintarray(NULL::bytea))) OR (cles.enforcementstatusgroupid = ANY (public.buildintarray(NULL::bytea))) OR (sles.enforcementstatusgroupid = ANY (public.buildintarray(NULL::bytea))) OR (eles.enforcementstatusgroupid = ANY (public.buildintarray(NULL::bytea))) OR (tdles.enforcementstatusgroupid = ANY (public.buildintarray(NULL::bytea)))))
13. 11.813 1,287.872 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=4.80..23,393.58 rows=1 width=400) (actual time=23.058..1,287.872 rows=11,868 loops=1)

  • Join Filter: (elesh.enforcementstatusid = l.enforcementstatusid)
14. 10.553 1,276.059 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=4.37..23,376.66 rows=1 width=396) (actual time=23.048..1,276.059 rows=11,868 loops=1)

  • Join Filter: (eles.enforcementstatusid = el.enforcementstatusid)
  • Rows Removed by Join Filter: 118680
15. 12.380 1,253.638 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=4.37..23,375.44 rows=1 width=392) (actual time=23.043..1,253.638 rows=11,868 loops=1)

  • Join Filter: (slesh.enforcementstatusid = l.enforcementstatusid)
16. 11.001 1,241.258 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.94..23,358.52 rows=1 width=388) (actual time=23.034..1,241.258 rows=11,868 loops=1)

  • Join Filter: (sles.enforcementstatusid = sl.enforcementstatusid)
  • Rows Removed by Join Filter: 118680
17. 14.617 1,218.389 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.94..23,357.29 rows=1 width=384) (actual time=23.028..1,218.389 rows=11,868 loops=1)

  • Join Filter: (clesh.enforcementstatusid = l.enforcementstatusid)
18. 7.852 1,191.904 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.51..23,342.40 rows=1 width=380) (actual time=23.012..1,191.904 rows=11,868 loops=1)

  • Join Filter: (cles.enforcementstatusid = cl.enforcementstatusid)
  • Rows Removed by Join Filter: 82515
19. 11.431 1,172.184 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.51..23,341.17 rows=1 width=376) (actual time=23.004..1,172.184 rows=11,868 loops=1)

20. 8.741 1,137.017 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.09..23,328.89 rows=1 width=372) (actual time=22.989..1,137.017 rows=11,868 loops=1)

  • Join Filter: (les.enforcementstatusid = l.enforcementstatusid)
  • Rows Removed by Join Filter: 59004
21. 11.968 1,116.408 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=3.09..23,327.67 rows=1 width=364) (actual time=22.983..1,116.408 rows=11,868 loops=1)

22. 11.441 1,104.440 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=2.67..23,319.71 rows=1 width=313) (actual time=22.973..1,104.440 rows=11,868 loops=1)

23. 12.279 1,092.999 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=2.25..23,308.67 rows=1 width=262) (actual time=22.963..1,092.999 rows=11,868 loops=1)

24. 51.121 1,080.720 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=1.83..23,297.63 rows=1 width=211) (actual time=22.954..1,080.720 rows=11,868 loops=1)

  • Join Filter: (cl.linkid = cler.linkid)
  • Rows Removed by Join Filter: 11868
  • Filter: (((public.parsedatearg(NULL::bytea) IS NULL) OR (dler.lastrequest >= public.parsedatearg(NULL::bytea)) OR (cler.lastrequest >= public.parsedatearg(NULL::bytea))) AND ((public.parsedatearg(NULL::bytea) IS NULL) OR (dler.lastrequest < public.parsedatearg(NULL::bytea)) OR (cler.lastrequest < public.parsedatearg(NULL::bytea))))
25. 17.333 1,029.599 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=1.83..23,295.10 rows=1 width=219) (actual time=22.944..1,029.599 rows=11,868 loops=1)

26. 11.249 1,000.398 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=1.42..23,287.14 rows=1 width=168) (actual time=22.925..1,000.398 rows=11,868 loops=1)

  • Join Filter: (l.linkid = dler.linkid)
  • Rows Removed by Join Filter: 11868
27. 57.217 989.149 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=1.42..23,286.12 rows=1 width=160) (actual time=22.919..989.149 rows=11,868 loops=1)

  • Filter: (((public.parsedatearg(NULL::bytea) IS NULL) OR (ielh.setat >= public.parsedatearg(NULL::bytea))) AND ((public.parsedatearg(NULL::bytea) IS NULL) OR (ielh.setat < public.parsedatearg(NULL::bytea))))
28. 23.398 908.196 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=0.99..23,268.19 rows=1 width=152) (actual time=22.877..908.196 rows=11,868 loops=1)

  • Join Filter: (ielg.enforcementlevelgroupid = iel.enforcementlevelgroupid)
  • Rows Removed by Join Filter: 679
  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (ielg.enforcementlevelgroupid = ANY (public.buildintarray(NULL::bytea))))
29. 26.143 884.798 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=0.99..23,265.05 rows=1 width=156) (actual time=22.871..884.798 rows=11,868 loops=1)

  • Join Filter: (istatg.incidentstatusgroupid = istat.incidentstatusgroupid)
  • Rows Removed by Join Filter: 12104
  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (istatg.incidentstatusgroupid = ANY (public.buildintarray(NULL::bytea))))
30. 7.185 858.655 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.99..23,259.24 rows=1 width=160) (actual time=22.862..858.655 rows=11,868 loops=1)

31. 14.354 815.866 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,258.37 rows=1 width=142) (actual time=22.842..815.866 rows=11,868 loops=1)

  • Join Filter: (i.enforcementlevelid = iel.enforcementlevelid)
  • Rows Removed by Join Filter: 81945
32. 12.127 706.568 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,251.01 rows=1 width=138) (actual time=22.828..706.568 rows=11,868 loops=1)

  • Join Filter: (i.incidentstatusid = istat.incidentstatusid)
  • Rows Removed by Join Filter: 8808
33. 9.633 670.705 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,239.98 rows=1 width=134) (actual time=22.813..670.705 rows=11,868 loops=1)

  • Join Filter: (a.assetid = asp.assetid)
  • Rows Removed by Join Filter: 59567
34. 0.511 637.336 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,237.05 rows=1 width=142) (actual time=22.806..637.336 rows=11,868 loops=1)

  • Join Filter: (coa.assetid = a.assetid)
  • Rows Removed by Join Filter: 2687
35. 6.243 613.089 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,235.41 rows=1 width=120) (actual time=22.797..613.089 rows=11,868 loops=1)

  • Join Filter: (i.assetid = coa.assetid)
  • Rows Removed by Join Filter: 2687
36. 0.000 594.978 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,233.77 rows=1 width=116) (actual time=22.791..594.978 rows=11,868 loops=1)

37. 7.403 560.255 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.71..23,232.54 rows=1 width=108) (actual time=22.784..560.255 rows=11,868 loops=1)

38. 6.157 439.522 ↓ 9.9 8,095 1

Nested Loop (cost=0.29..21,444.13 rows=818 width=68) (actual time=2.667..439.522 rows=8,095 loops=1)

  • Join Filter: (dl.infringementprotectiontypeid = pt.protectiontypeid)
  • Rows Removed by Join Filter: 48570
39. 0.065 0.065 ↓ 7.0 7 1

Seq Scan on protectiontype pt (cost=0.00..4.59 rows=1 width=4) (actual time=0.032..0.065 rows=7 loops=1)

  • Filter: ((public.parseintarg(NULL::bytea) IS NULL) OR (protectiontypeid = public.parseintarg(NULL::bytea)))
40. 30.058 433.300 ↓ 1.4 8,095 7

Nested Loop (cost=0.29..21,367.98 rows=5,725 width=68) (actual time=0.510..61.900 rows=8,095 loops=7)

41. 184.114 184.114 ↑ 1.0 15,652 7

Seq Scan on link l (cost=0.00..4,214.98 rows=15,696 width=59) (actual time=0.497..26.302 rows=15,652 loops=7)

  • Filter: (customerid = 36)
  • Rows Removed by Filter: 93626
42. 219.128 219.128 ↑ 1.0 1 109,564

Index Scan using uq_detectionlink_detectionlinkid_linktypeid on detectionlink dl (cost=0.29..1.09 rows=1 width=9) (actual time=0.002..0.002 rows=1 loops=109,564)

  • Index Cond: (detectionlinkid = l.linkid)
  • Filter: ((public.parseboolarg(NULL::bytea) IS NULL) OR (highrisk = public.parseboolarg(NULL::bytea)))
43. 113.330 113.330 ↑ 1.0 1 8,095

Index Scan using idx_incident_detectionlinkid_customerid on incident i (cost=0.42..2.18 rows=1 width=44) (actual time=0.007..0.014 rows=1 loops=8,095)

  • Index Cond: ((detectionlinkid = dl.detectionlinkid) AND (customerid = 36))
  • Filter: ((NOT deleted) AND ((public.parseintarg(NULL::bytea) IS NULL) OR (assetid = public.parseintarg(NULL::bytea))) AND ((public.parsedatearg('2020-01-01'::character varying) IS NULL) OR (createdat >= public.parsedatearg('2020-01-01'::character varying))) AND ((public.parsedatearg('2020-02-01'::character varying) IS NULL) OR (createdat < public.parsedatearg('2020-02-01'::character varying))))
  • Rows Removed by Filter: 0
44. 35.604 35.604 ↑ 1.0 1 11,868

Seq Scan on contract c (cost=0.00..1.23 rows=1 width=8) (actual time=0.001..0.003 rows=1 loops=11,868)

  • Filter: (active AND (contractid = 38) AND (customerid = 36))
  • Rows Removed by Filter: 14
45. 11.868 11.868 ↑ 8.0 1 11,868

Seq Scan on contract_asset coa (cost=0.00..1.54 rows=8 width=8) (actual time=0.001..0.001 rows=1 loops=11,868)

  • Filter: (contractid = 38)
  • Rows Removed by Filter: 5
46. 23.736 23.736 ↑ 8.0 1 11,868

Seq Scan on asset a (cost=0.00..1.54 rows=8 width=22) (actual time=0.001..0.002 rows=1 loops=11,868)

  • Filter: (customerid = 36)
  • Rows Removed by Filter: 5
47. 23.736 23.736 ↑ 7.2 6 11,868

Seq Scan on asset_scope asp (cost=0.00..2.40 rows=43 width=4) (actual time=0.001..0.002 rows=6 loops=11,868)

  • Filter: (scopeid = 1)
  • Rows Removed by Filter: 6
48. 23.736 23.736 ↑ 4.0 2 11,868

Seq Scan on incidentstatus istat (cost=0.00..10.93 rows=8 width=8) (actual time=0.002..0.002 rows=2 loops=11,868)

  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (incidentstatusid = ANY (public.buildintarray(NULL::bytea))))
49. 94.944 94.944 ↓ 1.1 8 11,868

Seq Scan on enforcementlevel iel (cost=0.00..7.27 rows=7 width=8) (actual time=0.002..0.008 rows=8 loops=11,868)

  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (enforcementlevelid = ANY (public.buildintarray(NULL::bytea))))
50. 35.604 35.604 ↑ 1.0 1 11,868

Index Scan using uq_domain_domainid_domaintypeid on domain d_2 (cost=0.28..0.82 rows=1 width=22) (actual time=0.003..0.003 rows=1 loops=11,868)

  • Index Cond: (domainid = l.domainid)
  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (domainid = ANY (public.buildintarray(NULL::bytea))))
51. 0.000 0.000 ↑ 4.5 2 11,868

Seq Scan on incidentstatusgroup istatg (cost=0.00..1.09 rows=9 width=4) (actual time=0.000..0.000 rows=2 loops=11,868)

52. 0.000 0.000 ↑ 4.0 1 11,868

Seq Scan on enforcementlevelgroup ielg (cost=0.00..1.04 rows=4 width=4) (actual time=0.000..0.000 rows=1 loops=11,868)

53. 21.936 23.736 ↓ 0.0 0 11,868

Index Scan using idx_incidentenforcementlevelhistory_incidentid on incidentenforcementlevelhistory ielh (cost=0.43..16.91 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=11,868)

  • Index Cond: (incidentid = i.incidentid)
  • Filter: ((enforcementlevelid = ANY ('{1,6}'::integer[])) AND (enforcementlevelid = i.enforcementlevelid) AND (setat = (SubPlan 1)))
  • Rows Removed by Filter: 1
54.          

SubPlan (for Index Scan)

55. 0.900 1.800 ↑ 1.0 1 450

Aggregate (cost=8.45..8.46 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=450)

56. 0.900 0.900 ↓ 2.0 2 450

Index Scan using idx_incidentenforcementlevelhistory_incidentid on incidentenforcementlevelhistory ielhd (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.002 rows=2 loops=450)

  • Index Cond: (incidentid = i.incidentid)
57. 0.000 0.000 ↑ 1.0 1 11,868

Seq Scan on enforcementrequest dler (cost=0.00..1.01 rows=1 width=12) (actual time=0.000..0.000 rows=1 loops=11,868)

58. 11.868 11.868 ↑ 1.0 1 11,868

Index Scan using uq_link_linkid_linktypeid on link cl (cost=0.42..7.95 rows=1 width=55) (actual time=0.001..0.001 rows=1 loops=11,868)

  • Index Cond: ((i.contentlinkid = linkid) AND (linktypeid = 2))
  • Filter: (customerid = 36)
59. 0.000 0.000 ↑ 1.0 1 11,868

Seq Scan on enforcementrequest cler (cost=0.00..1.01 rows=1 width=12) (actual time=0.000..0.000 rows=1 loops=11,868)

60. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using uq_link_linkid_linktypeid on link sl (cost=0.42..5.73 rows=1 width=55) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: ((i.shortenerlinkid = linkid) AND (linktypeid = 3))
  • Filter: (customerid = 36)
61. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using uq_link_linkid_linktypeid on link el (cost=0.42..5.73 rows=1 width=55) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: ((i.embeddedlinkid = linkid) AND (linktypeid = 4))
  • Filter: (customerid = 36)
62. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using uq_link_linkid_linktypeid on link tdl (cost=0.42..7.95 rows=1 width=55) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: ((i.targetdetectionlinkid = linkid) AND (linktypeid = 1))
  • Filter: (customerid = 36)
63. 11.868 11.868 ↑ 1.7 6 11,868

Seq Scan on enforcementstatus les (cost=0.00..1.10 rows=10 width=8) (actual time=0.000..0.001 rows=6 loops=11,868)

64. 23.736 23.736 ↓ 0.0 0 11,868

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh_5 (cost=0.43..12.27 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=11,868)

  • Index Cond: (linkid = l.linkid)
  • Filter: ((enforcementstatusid = 4) AND (enforcementstatusid = l.enforcementstatusid) AND (setat = (SubPlan 2)))
  • Rows Removed by Filter: 1
65.          

SubPlan (for Index Scan)

66. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=8) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (linkid = l.linkid)
68. 11.868 11.868 ↑ 1.2 8 11,868

Seq Scan on enforcementstatus cles (cost=0.00..1.10 rows=10 width=8) (actual time=0.000..0.001 rows=8 loops=11,868)

69. 11.868 11.868 ↓ 0.0 0 11,868

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory clesh (cost=0.43..14.88 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=11,868)

  • Index Cond: (linkid = cl.linkid)
  • Filter: ((enforcementstatusid = 4) AND (setat = (SubPlan 3)))
  • Rows Removed by Filter: 1
70.          

SubPlan (for Index Scan)

71. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=8) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (linkid = cl.linkid)
73. 11.868 11.868 ↑ 1.0 10 11,868

Seq Scan on enforcementstatus sles (cost=0.00..1.10 rows=10 width=8) (actual time=0.000..0.001 rows=10 loops=11,868)

74. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory slesh (cost=0.43..16.91 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: (linkid = sl.linkid)
  • Filter: ((enforcementstatusid = 4) AND (setat = (SubPlan 4)))
75.          

SubPlan (for Index Scan)

76. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=8) (never executed)

77. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh_2 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (linkid = sl.linkid)
78. 11.868 11.868 ↑ 1.0 10 11,868

Seq Scan on enforcementstatus eles (cost=0.00..1.10 rows=10 width=8) (actual time=0.000..0.001 rows=10 loops=11,868)

79. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory elesh (cost=0.43..16.91 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: (linkid = el.linkid)
  • Filter: ((enforcementstatusid = 4) AND (setat = (SubPlan 5)))
80.          

SubPlan (for Index Scan)

81. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=8) (never executed)

82. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh_3 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (linkid = el.linkid)
83. 11.868 11.868 ↑ 1.0 10 11,868

Seq Scan on enforcementstatus tdles (cost=0.00..1.10 rows=10 width=8) (actual time=0.000..0.001 rows=10 loops=11,868)

84. 0.000 0.000 ↓ 0.0 0 11,868

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory tdlesh (cost=0.43..12.95 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: (linkid = tdl.linkid)
  • Filter: ((enforcementstatusid = 4) AND (setat = (SubPlan 6)))
  • Rows Removed by Filter: 0
85.          

SubPlan (for Index Scan)

86. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.45..8.46 rows=1 width=8) (never executed)

87. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_linkenforcementstatushistory_linkid on linkenforcementstatushistory lesh_4 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (linkid = tdl.linkid)
88. 11.868 11.868 ↓ 0.0 0 11,868

Seq Scan on detectionlinkwatcher dlw (cost=0.00..1.18 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=11,868)

  • Filter: ((createdby)::text = 'system'::text)
  • Rows Removed by Filter: 14
89. 23.736 23.736 ↓ 0.0 0 11,868

Index Scan using idx_incidentstatushistory_incidentid_setby_incidentstatusid on incidentstatushistory ish (cost=0.43..16.99 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=11,868)

  • Index Cond: ((incidentid = i.incidentid) AND (incidentstatusid = 9))
  • Filter: (setat = (SubPlan 7))
90.          

SubPlan (for Index Scan)

91. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.49..8.50 rows=1 width=8) (never executed)

92. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_incidentstatushistory_incidentid_setby_incidentstatusid on incidentstatushistory aush (cost=0.43..8.49 rows=1 width=8) (never executed)

  • Index Cond: ((incidentid = i.incidentid) AND (incidentstatusid = 9))
93. 11.868 11.868 ↓ 0.0 0 11,868

Index Scan using uq_customerdivision_customerid_name on customerdivision cd (cost=0.14..8.16 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=11,868)

  • Index Cond: (customerid = 36)
94. 0.000 0.000 ↓ 0.0 0 11,868

Seq Scan on domain_customerdivision dcd (cost=0.00..10.70 rows=70 width=8) (actual time=0.000..0.000 rows=0 loops=11,868)

95. 0.000 0.000 ↓ 0.0 0 11,868

Index Only Scan using uq_contract_customerdivision__contract_customerdivision on contract_customerdivision ccd (cost=0.14..8.16 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: (contractid = 38)
  • Heap Fetches: 0
96. 0.000 0.000 ↓ 0.0 0 11,868

Index Only Scan using uq_customerdivisionscope_customerdivision_scope on customerdivision_scope cc (cost=0.15..8.17 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=11,868)

  • Index Cond: ((customerdivisionid = cd.customerdivisionid) AND (scopeid = 1))
  • Heap Fetches: 0
97. 0.026 1,664.872 ↓ 21.0 42 1

Unique (cost=21.87..22.02 rows=2 width=4,238) (actual time=1,664.845..1,664.872 rows=42 loops=1)

98. 7.212 1,664.846 ↓ 21.0 42 1

Sort (cost=21.87..21.87 rows=2 width=4,238) (actual time=1,664.844..1,664.846 rows=42 loops=1)

  • Sort Key: data.incidentstatus, data.incidentid, data.assetid, data.assetname, data.detectiondate, data.closuredate, data.confirmationdate, data.protectiontype, data.enforcementlevel, data.detectiondomainid, data.detectiondomain, data.highrisk, data.watching, data.dlurl, data.dles, data.dlonenforcementdate, data.clurl, data.cles, data.clonenforcementdate, data.slurl, data.sles, data.slonenforcementdate, data.elurl, data.eles, data.elonenforcementdate, data.tdlurl, data.tdles, data.tdlonenforcementdate, dp.name
  • Sort Method: quicksort Memory: 3601kB
99. 5.504 1,657.634 ↓ 6,054.5 12,109 1

Unique (cost=21.69..21.84 rows=2 width=4,238) (actual time=1,651.535..1,657.634 rows=12,109 loops=1)

100. 7.400 1,652.130 ↓ 6,054.5 12,109 1

Sort (cost=21.69..21.69 rows=2 width=4,238) (actual time=1,651.534..1,652.130 rows=12,109 loops=1)

  • Sort Key: data.incidentid, data.assetid, data.assetname, data.detectiondate, data.closuredate, data.confirmationdate, data.protectiontype, data.incidentstatus, data.enforcementlevel, data.detectiondomainid, data.detectiondomain, data.highrisk, data.watching, data.dlurl, data.dles, data.dlonenforcementdate, data.clurl, data.cles, data.clonenforcementdate, data.slurl, data.sles, data.slonenforcementdate, data.elurl, data.eles, data.elonenforcementdate, data.tdlurl, data.tdles, data.tdlonenforcementdate, dp.name
  • Sort Method: quicksort Memory: 3601kB
101. 1.301 1,644.730 ↓ 6,054.5 12,109 1

Append (cost=0.70..21.68 rows=2 width=4,238) (actual time=1,530.995..1,644.730 rows=12,109 loops=1)

102. 18.897 1,621.982 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=0.70..9.36 rows=1 width=3,730) (actual time=1,530.994..1,621.982 rows=11,868 loops=1)

  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (dp.domainplatformid = ANY (public.buildintarray(NULL::bytea))))
103. 10.816 1,591.217 ↓ 11,868.0 11,868 1

Nested Loop Left Join (cost=0.56..8.67 rows=1 width=3,726) (actual time=1,530.968..1,591.217 rows=11,868 loops=1)

104. 14.718 1,568.533 ↓ 11,868.0 11,868 1

Nested Loop (cost=0.28..8.32 rows=1 width=3,726) (actual time=1,530.953..1,568.533 rows=11,868 loops=1)

105. 1,541.947 1,541.947 ↓ 11,868.0 11,868 1

CTE Scan on data (cost=0.00..0.02 rows=1 width=3,722) (actual time=1,530.921..1,541.947 rows=11,868 loops=1)

106. 11.868 11.868 ↑ 1.0 1 11,868

Index Scan using uq_domain_domainid_domaintypeid on domain d (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=11,868)

  • Index Cond: (domainid = data.detectiondomainid)
107. 11.868 11.868 ↑ 1.0 1 11,868

Index Scan using pk_domainconfiguration on domainconfiguration dcfg (cost=0.28..0.35 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=11,868)

  • Index Cond: (domainconfigurationid = d.domainconfigurationid)
108. 11.868 11.868 ↑ 1.0 1 11,868

Index Scan using pk_domainplatform on domainplatform dp (cost=0.14..0.16 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=11,868)

  • Index Cond: (dcfg.domainplatformid = domainplatformid)
109. 0.495 21.447 ↓ 241.0 241 1

Nested Loop Left Join (cost=0.98..12.29 rows=1 width=3,730) (actual time=12.742..21.447 rows=241 loops=1)

  • Filter: ((public.buildintarray(NULL::bytea) IS NULL) OR (dp_1.domainplatformid = ANY (public.buildintarray(NULL::bytea))))
110. 0.274 20.229 ↓ 241.0 241 1

Nested Loop (cost=0.56..9.68 rows=1 width=3,726) (actual time=12.689..20.229 rows=241 loops=1)

111. 6.573 19.714 ↓ 241.0 241 1

Nested Loop (cost=0.28..8.39 rows=1 width=3,726) (actual time=12.665..19.714 rows=241 loops=1)

112. 1.273 1.273 ↓ 11,868.0 11,868 1

CTE Scan on data data_1 (cost=0.00..0.02 rows=1 width=3,722) (actual time=0.001..1.273 rows=11,868 loops=1)

113. 11.868 11.868 ↓ 0.0 0 11,868

Index Scan using uq_domain_domainid_domaintypeid on domain d_1 (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=11,868)

  • Index Cond: (domainid = data_1.detectiondomainid)
  • Filter: (domainconfigurationid IS NULL)
  • Rows Removed by Filter: 1
114. 0.241 0.241 ↑ 1.0 1 241

Index Scan using uq_domain_domainid_domaintypeid on domain md (cost=0.28..1.27 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=241)

  • Index Cond: (domainid = d_1.masterdomainid)
  • Filter: (hierarchylevelid = 1)
115. 0.241 0.723 ↑ 1.0 1 241

Nested Loop Left Join (cost=0.42..2.08 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=241)

116. 0.241 0.241 ↑ 1.0 1 241

Index Scan using pk_domainconfiguration on domainconfiguration dcfg_1 (cost=0.28..1.92 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=241)

  • Index Cond: (domainconfigurationid = md.domainconfigurationid)
117. 0.241 0.241 ↑ 1.0 1 241

Index Scan using pk_domainplatform on domainplatform dp_1 (cost=0.14..0.16 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=241)

  • Index Cond: (dcfg_1.domainplatformid = domainplatformid)
Planning time : 40.993 ms
Execution time : 1,667.269 ms