explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7Jex

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

Hash Left Join (cost=27,399,858.92..81,760,590.91 rows=943 width=1,258) (actual rows= loops=)

  • Hash Cond: (a.cdfassetsubcategoryid = cdfassetsubcategory.subcategoryid)
2. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,399,857.68..81,745,433.12 rows=943 width=1,021) (actual rows= loops=)

  • Hash Cond: (a.cdfassetcategoryid = cdfassetcategory.categoryid)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=27,399,856.63..81,745,429.54 rows=943 width=817) (actual rows= loops=)

  • Hash Cond: (a.ouid = cdfoumaster.ouid)
4. 0.000 0.000 ↓ 0.0

Merge Join (cost=27,399,853.47..81,745,423.85 rows=943 width=809) (actual rows= loops=)

  • Merge Cond: (cdf.cdfid = cdfautherdetails.cdfid)
5. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=27,399,041.52..82,238,622.11 rows=999 width=779) (actual rows= loops=)

  • Merge Cond: (a.cdfid = cdfassetdetails.cdfid)
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=27,398,498.96..82,238,038.09 rows=988 width=778) (actual rows= loops=)

  • Join Filter: (a.cdfid = cdf.cdfid)
7. 0.000 0.000 ↓ 0.0

Index Scan using pk_b68 on cdf (cost=0.28..412.16 rows=6,001 width=92) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Materialize (cost=27,398,498.68..82,148,693.59 rows=988 width=686) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Subquery Scan on a (cost=27,398,498.68..82,148,688.65 rows=988 width=686) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Append (cost=27,398,498.68..82,148,678.77 rows=988 width=686) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=27,398,498.68..27,398,510.29 rows=662 width=596) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Unique (cost=27,398,498.68..27,398,502.02 rows=662 width=607) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=27,398,498.68..27,398,500.35 rows=667 width=607) (actual rows= loops=)

  • Sort Key: cdf_1.cdfnumber
14. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..27,398,467.39 rows=667 width=607) (actual rows= loops=)

  • Join Filter: (aud.cdfid = cdf_1.cdfid)
15. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..27,369,185.62 rows=667 width=279) (actual rows= loops=)

  • Join Filter: (cdf_1.cdfstatusid = cdfstatusmaster.statusid)
16. 0.000 0.000 ↓ 0.0

Seq Scan on cdf cdf_1 (cost=0.00..27,368,813.69 rows=667 width=61) (actual rows= loops=)

  • Filter: (((SubPlan 4) >= '2019-10-12 00:00:00'::timestamp without time zone) AND ((SubPlan 5) <= '2019-11-24 00:00:00'::timestamp without time zone))
17.          

SubPlan (for Seq Scan)

18. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit.createdby
20. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_1.cdfid) AND (cdfstatusid = '1'::numeric))
21. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit_1.createdby
23. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit cdfaudit_1 (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_1.cdfid) AND (cdfstatusid = '1'::numeric))
24. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.57 rows=38 width=232) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Seq Scan on cdfstatusmaster (cost=0.00..1.38 rows=38 width=232) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2,046.90 rows=2,159 width=12) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit aud (cost=0.00..2,036.10 rows=2,159 width=12) (actual rows= loops=)

  • Filter: (cdfstatusid = '6'::numeric)
28.          

SubPlan (for Nested Loop Left Join)

29. 0.000 0.000 ↓ 0.0

Index Scan using idx_idfemployeemaster_employeeid on idfemployeemaster idfemployeemaster_1 (cost=0.43..8.45 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((employeeid)::text = (aud.createdby)::text)
30. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=27,378,461.56..27,378,465.89 rows=289 width=562) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Unique (cost=27,378,461.56..27,378,463.00 rows=289 width=577) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Sort (cost=27,378,461.56..27,378,462.28 rows=289 width=577) (actual rows= loops=)

  • Sort Key: cdf_2.cdfnumber
33. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6.37..27,378,449.75 rows=289 width=577) (actual rows= loops=)

  • Join Filter: (aud_1.cdfid = cdf_2.cdfid)
34. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=6.37..27,373,474.23 rows=289 width=325) (actual rows= loops=)

  • Filter: ((cdf_2.currentprocess = ANY ('{PUBLICATION,"CDF REJECTED IN PUBLICATION"}'::text[])) OR cdf_2.ispublished OR (map.pubapprovedate IS NOT NULL) OR ((cdfstatusmaster_1.statusname)::text = 'Copyright Publication Saved'::text))
35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..27,369,185.62 rows=667 width=310) (actual rows= loops=)

  • Join Filter: (cdf_2.cdfstatusid = cdfstatusmaster_1.statusid)
36. 0.000 0.000 ↓ 0.0

Seq Scan on cdf cdf_2 (cost=0.00..27,368,813.69 rows=667 width=92) (actual rows= loops=)

  • Filter: (((SubPlan 8) >= '2019-10-12 00:00:00'::timestamp without time zone) AND ((SubPlan 9) <= '2019-11-24 00:00:00'::timestamp without time zone))
37.          

SubPlan (for Seq Scan)

38. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

39. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit_2.createdby
40. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit cdfaudit_2 (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_2.cdfid) AND (cdfstatusid = '1'::numeric))
41. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit_3.createdby
43. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit cdfaudit_3 (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_2.cdfid) AND (cdfstatusid = '1'::numeric))
44. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.57 rows=38 width=232) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

Seq Scan on cdfstatusmaster cdfstatusmaster_1 (cost=0.00..1.38 rows=38 width=232) (actual rows= loops=)

46. 0.000 0.000 ↓ 0.0

Index Scan using cdfpublicationmapping_pkey on cdfpublicationmapping map (cost=6.37..6.41 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (mapid = (SubPlan 7))
47.          

SubPlan (for Index Scan)

48. 0.000 0.000 ↓ 0.0

Aggregate (cost=6.21..6.22 rows=1 width=4) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Seq Scan on cdfpublicationmapping map1 (cost=0.00..6.21 rows=1 width=4) (actual rows= loops=)

  • Filter: ((cdfid)::numeric = cdf_2.cdfid)
50. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2,036.67 rows=114 width=12) (actual rows= loops=)

51. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit aud_1 (cost=0.00..2,036.10 rows=114 width=12) (actual rows= loops=)

  • Filter: (cdfstatusid = '7'::numeric)
52.          

SubPlan (for Nested Loop Left Join)

53. 0.000 0.000 ↓ 0.0

Index Scan using idx_idfemployeemaster_employeeid on idfemployeemaster idfemployeemaster_2 (cost=0.43..8.45 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((employeeid)::text = (aud_1.createdby)::text)
54. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=27,371,697.09..27,371,697.64 rows=37 width=562) (actual rows= loops=)

55. 0.000 0.000 ↓ 0.0

Unique (cost=27,371,697.09..27,371,697.27 rows=37 width=577) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Sort (cost=27,371,697.09..27,371,697.18 rows=37 width=577) (actual rows= loops=)

  • Sort Key: cdf_3.cdfnumber
57. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.00..27,371,696.12 rows=37 width=577) (actual rows= loops=)

  • Join Filter: (aud_2.cdfid = cdf_3.cdfid)
58. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..27,369,321.36 rows=37 width=325) (actual rows= loops=)

  • Join Filter: ((cdf_3.cdfstatusid = cdfstatusmaster_2.statusid) AND ((cdf_3.currentprocess = ANY ('{REGISTRATION,"CDF REJECTED IN REGISTRATION"}'::text[])) OR cdf_3.isregister OR (cdf_3.regstrationsubmitteddt IS NOT NULL) OR ((cdfstatusmaster_2.statusname)::text = 'Copyright Registration Saved'::text)))
59. 0.000 0.000 ↓ 0.0

Seq Scan on cdf cdf_3 (cost=0.00..27,368,813.69 rows=667 width=108) (actual rows= loops=)

  • Filter: (((SubPlan 11) >= '2019-10-12 00:00:00'::timestamp without time zone) AND ((SubPlan 12) <= '2019-11-24 00:00:00'::timestamp without time zone))
60.          

SubPlan (for Seq Scan)

61. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit_4.createdby
63. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit cdfaudit_4 (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_3.cdfid) AND (cdfstatusid = '1'::numeric))
64. 0.000 0.000 ↓ 0.0

Limit (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

65. 0.000 0.000 ↓ 0.0

Sort (cost=2,280.33..2,280.34 rows=1 width=15) (actual rows= loops=)

  • Sort Key: cdfaudit_5.createdby
66. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit cdfaudit_5 (cost=0.00..2,280.32 rows=1 width=15) (actual rows= loops=)

  • Filter: ((cdfid = cdf_3.cdfid) AND (cdfstatusid = '1'::numeric))
67. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.57 rows=38 width=232) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Seq Scan on cdfstatusmaster cdfstatusmaster_2 (cost=0.00..1.38 rows=38 width=232) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2,036.33 rows=46 width=12) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Seq Scan on cdfaudit aud_2 (cost=0.00..2,036.10 rows=46 width=12) (actual rows= loops=)

  • Filter: (cdfstatusid = '13'::numeric)
71.          

SubPlan (for Nested Loop Left Join)

72. 0.000 0.000 ↓ 0.0

Index Scan using idx_idfemployeemaster_employeeid on idfemployeemaster idfemployeemaster_3 (cost=0.43..8.45 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((employeeid)::text = (aud_2.createdby)::text)
73. 0.000 0.000 ↓ 0.0

Sort (cost=542.55..557.05 rows=5,800 width=8) (actual rows= loops=)

  • Sort Key: cdfassetdetails.cdfid
74. 0.000 0.000 ↓ 0.0

Seq Scan on cdfassetdetails (cost=0.00..180.00 rows=5,800 width=8) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Sort (cost=811.78..825.95 rows=5,666 width=34) (actual rows= loops=)

  • Sort Key: cdfautherdetails.cdfid
76. 0.000 0.000 ↓ 0.0

Seq Scan on cdfautherdetails (cost=0.00..458.56 rows=5,666 width=34) (actual rows= loops=)

  • Filter: (isfirstnamedauthor = '1'::numeric)
77. 0.000 0.000 ↓ 0.0

Hash (cost=1.96..1.96 rows=96 width=27) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Seq Scan on cdfoumaster (cost=0.00..1.96 rows=96 width=27) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Hash (cost=1.02..1.02 rows=2 width=232) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on cdfassetcategory (cost=0.00..1.02 rows=2 width=232) (actual rows= loops=)

81. 0.000 0.000 ↓ 0.0

Hash (cost=1.11..1.11 rows=11 width=232) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Seq Scan on cdfassetsubcategory (cost=0.00..1.11 rows=11 width=232) (actual rows= loops=)

83.          

SubPlan (for Hash Left Join)

84. 0.000 0.000 ↓ 0.0

Limit (cost=7.57..7.58 rows=1 width=8) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Sort (cost=7.57..7.58 rows=1 width=8) (actual rows= loops=)

  • Sort Key: cdfsendback.updateddate DESC
86. 0.000 0.000 ↓ 0.0

Seq Scan on cdfsendback (cost=0.00..7.56 rows=1 width=8) (actual rows= loops=)

  • Filter: (((cdfid)::numeric = cdf.cdfid) AND ((statusid)::numeric = cdf.cdfstatusid))
87. 0.000 0.000 ↓ 0.0

Index Scan using idx_idfemployeemaster_employeeid on idfemployeemaster (cost=0.43..8.45 rows=1 width=33) (actual rows= loops=)

  • Index Cond: ((employeeid)::text = (cdf.currentreviewerid)::text)