explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jive

Settings
# exclusive inclusive rows x rows loops node
1. 0.211 4,830.850 ↓ 1.6 33 1

GroupAggregate (cost=43,457.10..43,459.10 rows=20 width=834) (actual time=4,830.677..4,830.850 rows=33 loops=1)

  • Group Key: "*SELECT* 1".cmpcod, "*SELECT* 1".arpcod, "*SELECT* 1".fltcaridr, "*SELECT* 1".fltnum, "*SELECT* 1".fltseqnum, "*SELECT* 1".fltdat, "*SELECT* 1".legsernum, "*SELECT* 1".fltrou, "*SELECT* 1".fltorg, "*SELECT* 1".fltdst, "*SELECT* 1".flttyp, "*SELECT* 1".fltsta, "*SELECT* 1".acrtyp, "*SELECT* 1".legorg, "*SELECT* 1".fltdatprefix, "*SELECT* 1".expclsflg, "*SELECT* 1".depgte, "*SELECT* 1".deptim, "*SELECT* 1".arvgte
2.          

CTE preadvsmy

3. 0.022 77.148 ↓ 6.0 6 1

GroupAggregate (cost=19,592.51..19,592.55 rows=1 width=74) (actual time=77.137..77.148 rows=6 loops=1)

  • Group Key: malmst_2.cmpcod, trt.fltcaridr, trt.fltnum, trt.fltseqnum, csgdtl.uldnum
4. 0.022 77.126 ↓ 17.0 17 1

Sort (cost=19,592.51..19,592.52 rows=1 width=45) (actual time=77.125..77.126 rows=17 loops=1)

  • Sort Key: trt.fltseqnum, csgdtl.uldnum
  • Sort Method: quicksort Memory: 26kB
5. 0.035 77.104 ↓ 17.0 17 1

Nested Loop (cost=2,488.77..19,592.50 rows=1 width=45) (actual time=11.474..77.104 rows=17 loops=1)

6. 0.000 76.961 ↓ 27.0 27 1

Nested Loop (cost=2,488.49..19,592.20 rows=1 width=52) (actual time=11.459..76.961 rows=27 loops=1)

  • Join Filter: (((csgmst.csgdocnum)::text = (csgdtl.csgdocnum)::text) AND (csgmst.csgseqnum = csgdtl.csgseqnum) AND ((csgmst.poacod)::text = (csgdtl.poacod)::text))
7. 5.119 76.845 ↓ 27.0 27 1

Gather (cost=2,488.07..19,591.71 rows=1 width=121) (actual time=11.431..76.845 rows=27 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 12.632 71.726 ↓ 9.0 9 3 / 3

Hash Join (cost=1,488.07..18,591.61 rows=1 width=121) (actual time=13.435..71.726 rows=9 loops=3)

  • Hash Cond: (((malmst_2.csgdocnum)::text = (csgmst.csgdocnum)::text) AND (malmst_2.csgseqnum = csgmst.csgseqnum) AND ((malmst_2.poacod)::text = (csgmst.poacod)::text))
9. 48.844 48.844 ↑ 1.2 115,151 3 / 3

Parallel Seq Scan on malmst malmst_2 (cost=0.00..15,484.23 rows=143,938 width=45) (actual time=0.005..48.844 rows=115,151 loops=3)

  • Filter: ((cmpcod)::text = 'AA'::text)
10. 0.009 10.250 ↓ 13.0 13 3 / 3

Hash (cost=1,488.06..1,488.06 rows=1 width=76) (actual time=10.250..10.250 rows=13 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.074 10.241 ↓ 13.0 13 3 / 3

Hash Join (cost=785.63..1,488.06 rows=1 width=76) (actual time=5.880..10.241 rows=13 loops=3)

  • Hash Cond: (((trt.csgdocnum)::text = (csgmst.csgdocnum)::text) AND (trt.csgseqnum = csgmst.csgseqnum) AND ((trt.poacod)::text = (csgmst.poacod)::text))
12. 4.398 4.398 ↓ 1.6 13 3 / 3

Seq Scan on malcsgrtg trt (cost=0.00..702.30 rows=8 width=50) (actual time=0.047..4.398 rows=13 loops=3)

  • Filter: (((cmpcod)::text = 'AA'::text) AND (fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text))
  • Rows Removed by Filter: 22061
13. 3.390 5.769 ↑ 1.0 13,521 3 / 3

Hash (cost=549.01..549.01 rows=13,521 width=29) (actual time=5.769..5.769 rows=13,521 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 937kB
14. 2.379 2.379 ↑ 1.0 13,521 3 / 3

Seq Scan on malcsgmst csgmst (cost=0.00..549.01 rows=13,521 width=29) (actual time=0.009..2.379 rows=13,521 loops=3)

  • Filter: ((cmpcod)::text = 'AA'::text)
15. 0.135 0.135 ↑ 1.0 1 27

Index Scan using malcsgdtl_ind2 on malcsgdtl csgdtl (cost=0.42..0.47 rows=1 width=44) (actual time=0.005..0.005 rows=1 loops=27)

  • Index Cond: (((cmpcod)::text = 'AA'::text) AND (malseqnum = malmst_2.malseqnum))
  • Filter: (((malmst_2.csgdocnum)::text = (csgdocnum)::text) AND (malmst_2.csgseqnum = csgseqnum) AND ((malmst_2.poacod)::text = (poacod)::text))
  • Rows Removed by Filter: 0
16. 0.108 0.108 ↑ 1.0 1 27

Index Scan using malexgofcmst_pk on malexgofcmst ofc (cost=0.28..0.30 rows=1 width=10) (actual time=0.004..0.004 rows=1 loops=27)

  • Index Cond: (((cmpcod)::text = 'AA'::text) AND ((exgofccod)::text = (malmst_2.orgexgofc)::text))
  • Filter: ((actflg)::text = 'A'::text)
17. 0.429 4,830.639 ↓ 3.1 63 1

Sort (cost=23,864.55..23,864.60 rows=20 width=834) (actual time=4,830.635..4,830.639 rows=63 loops=1)

  • Sort Key: "*SELECT* 1".cmpcod, "*SELECT* 1".arpcod, "*SELECT* 1".fltcaridr, "*SELECT* 1".fltnum, "*SELECT* 1".fltseqnum, "*SELECT* 1".fltdat, "*SELECT* 1".legsernum, "*SELECT* 1".fltrou, "*SELECT* 1".fltorg, "*SELECT* 1".fltdst, "*SELECT* 1".flttyp, "*SELECT* 1".fltsta, "*SELECT* 1".acrtyp, "*SELECT* 1".legorg, "*SELECT* 1".fltdatprefix, "*SELECT* 1".expclsflg, "*SELECT* 1".depgte, "*SELECT* 1".deptim, "*SELECT* 1".arvgte
  • Sort Method: quicksort Memory: 41kB
18. 0.032 4,830.210 ↓ 3.1 63 1

Append (cost=10,809.21..23,863.92 rows=20 width=834) (actual time=152.521..4,830.210 rows=63 loops=1)

19. 0.001 10.956 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=10,809.21..10,809.84 rows=7 width=374) (actual time=10.956..10.956 rows=0 loops=1)

20. 0.001 10.955 ↓ 0.0 0 1

GroupAggregate (cost=10,809.21..10,809.75 rows=7 width=359) (actual time=10.955..10.955 rows=0 loops=1)

  • Group Key: fltmst.cmpcod, malflt.arpcod, fltmst.fltcaridr, fltmst.fltnum, fltmst.fltseqnum, malflt.legsernum, fltleg.acrtyp, fltleg.legorg, (COALESCE(malflt.expclsflg, 'N'::character varying)), fltleg.depgte, fltleg.arvgte, fltcon.connum, ((substr((fltcon.connum)::text, 1, 3))::character varying), (COALESCE(fltleg.atd, fltleg.etd, fltleg.std)), (CASE WHEN (fltleg.atd IS NOT NULL) THEN 'A'::text ELSE CASE WHEN (fltleg.etd IS NOT NULL) THEN 'E'::text ELSE CASE WHEN (fltleg.std IS NOT NULL) THEN 'S'::text ELSE ''::text END END END)
21. 0.012 10.954 ↓ 0.0 0 1

Sort (cost=10,809.21..10,809.23 rows=7 width=798) (actual time=10.954..10.954 rows=0 loops=1)

  • Sort Key: fltmst.fltseqnum, malflt.legsernum, fltleg.acrtyp, (COALESCE(malflt.expclsflg, 'N'::character varying)), fltleg.depgte, fltleg.arvgte, fltcon.connum, ((substr((fltcon.connum)::text, 1, 3))::character varying), (COALESCE(fltleg.atd, fltleg.etd, fltleg.std)), (CASE WHEN (fltleg.atd IS NOT NULL) THEN 'A'::text ELSE CASE WHEN (fltleg.etd IS NOT NULL) THEN 'E'::text ELSE CASE WHEN (fltleg.std IS NOT NULL) THEN 'S'::text ELSE ''::text END END END)
  • Sort Method: quicksort Memory: 25kB
22. 0.001 10.942 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.40..10,809.11 rows=7 width=798) (actual time=10.942..10.942 rows=0 loops=1)

23. 0.000 10.941 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.98..10,777.81 rows=7 width=720) (actual time=10.941..10.941 rows=0 loops=1)

  • Join Filter: (((segdtl.cmpcod)::text = (preadv.cmpcod)::text) AND (segdtl.fltcaridr = preadv.fltcaridr) AND ((segdtl.fltnum)::text = (preadv.fltnum)::text) AND (segdtl.fltseqnum = preadv.fltseqnum))
24. 0.000 10.941 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.98..10,777.58 rows=7 width=698) (actual time=10.941..10.941 rows=0 loops=1)

  • Join Filter: (((fltleg.cmpcod)::text = (dwsmst.cmpcod)::text) AND ((fltleg.fltnum)::text = (dwsmst.fltnum)::text) AND (fltleg.fltcaridr = dwsmst.fltcaridr) AND ((fltleg.legorg)::text = (dwsmst.arpcod)::text) AND (fltleg.fltseqnum = dwsmst.fltseqnum) AND (fltleg.legsernum = dwsmst.legsernum))
25. 0.001 10.941 ↓ 0.0 0 1

Nested Loop (cost=1.98..10,766.78 rows=7 width=157) (actual time=10.941..10.941 rows=0 loops=1)

  • Join Filter: ((fltmst.fltseqnum = fltcon.fltseqnum) AND (fltleg.legsernum = fltcon.legsernum))
26. 0.014 6.790 ↓ 5.0 5 1

Nested Loop (cost=0.85..2,077.79 rows=1 width=137) (actual time=6.737..6.790 rows=5 loops=1)

  • Join Filter: (fltleg.fltseqnum = fltmst.fltseqnum)
27. 0.029 6.711 ↓ 5.0 5 1

Nested Loop (cost=0.43..2,069.32 rows=1 width=89) (actual time=6.692..6.711 rows=5 loops=1)

  • Join Filter: ((fltleg.fltseqnum = malflt.fltseqnum) AND (fltleg.legsernum = malflt.legsernum))
  • Rows Removed by Join Filter: 160
28. 0.082 0.082 ↓ 1.7 33 1

Index Scan using fltoprleg_ind5 on fltoprleg fltleg (cost=0.43..72.54 rows=19 width=61) (actual time=0.067..0.082 rows=33 loops=1)

  • Index Cond: ((fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text) AND ((legorg)::text = 'DFW'::text))
  • Filter: ((cmpcod)::text = 'AA'::text)
29. 0.021 6.600 ↓ 5.0 5 33

Materialize (cost=0.00..1,996.45 rows=1 width=28) (actual time=0.000..0.200 rows=5 loops=33)

30. 6.579 6.579 ↓ 5.0 5 1

Seq Scan on malflt (cost=0.00..1,996.44 rows=1 width=28) (actual time=0.006..6.579 rows=5 loops=1)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
  • Rows Removed by Filter: 59867
31. 0.065 0.065 ↑ 1.0 1 5

Index Scan using fltoprmst_pk on fltoprmst fltmst (cost=0.43..8.46 rows=1 width=48) (actual time=0.013..0.013 rows=1 loops=5)

  • Index Cond: (((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = malflt.fltseqnum) AND ((cmpcod)::text = 'AA'::text))
  • Filter: ((fltsta)::text <> 'CAN'::text)
32. 0.005 4.150 ↓ 0.0 0 5

Nested Loop Left Join (cost=1.12..8,688.89 rows=7 width=65) (actual time=0.829..0.830 rows=0 loops=5)

33. 4.145 4.145 ↓ 0.0 0 5

Seq Scan on malfltcon fltcon (cost=0.00..201.93 rows=1 width=40) (actual time=0.829..0.829 rows=0 loops=5)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((asgprt)::text = 'DFW'::text) AND ((contyp)::text = 'U'::text) AND ((acpflg)::text = 'Y'::text))
  • Rows Removed by Filter: 4237
34. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=1.12..8,486.90 rows=7 width=62) (never executed)

35. 0.000 0.000 ↓ 0.0 0

Index Only Scan using maluldseg_pk on maluldseg uldseg (cost=0.28..4.32 rows=1 width=33) (never executed)

  • Index Cond: ((cmpcod = (fltcon.cmpcod)::text) AND (cmpcod = 'AA'::text) AND (fltcaridr = fltcon.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltnum = (fltcon.fltnum)::text) AND (fltnum = '0030'::text) AND (fltseqnum = fltcon.fltseqnum) AND (segsernum = fltcon.segsernum) AND (uldnum = (fltcon.connum)::text))
  • Heap Fetches: 0
36. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.84..8,482.57 rows=1 width=43) (never executed)

37. 0.000 0.000 ↓ 0.0 0

Index Only Scan using maluldsegdtl_pk on maluldsegdtl segdtl (cost=0.42..4.46 rows=1 width=39) (never executed)

  • Index Cond: ((cmpcod = (uldseg.cmpcod)::text) AND (cmpcod = 'AA'::text) AND (fltcaridr = uldseg.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltnum = (uldseg.fltnum)::text) AND (fltnum = '0030'::text) AND (fltseqnum = uldseg.fltseqnum) AND (segsernum = uldseg.segsernum) AND (uldnum = (uldseg.uldnum)::text))
  • Heap Fetches: 0
38. 0.000 0.000 ↓ 0.0 0

Index Scan using malmst_ind8 on malmst (cost=0.42..8,478.10 rows=1 width=14) (never executed)

  • Index Cond: (((segdtl.cmpcod)::text = (cmpcod)::text) AND ((cmpcod)::text = 'AA'::text))
  • Filter: (segdtl.malseqnum = malseqnum)
39. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..10.61 rows=1 width=680) (never executed)

40. 0.000 0.000 ↓ 0.0 0

Seq Scan on oprdwsmst dwsmst (cost=0.00..10.60 rows=1 width=680) (never executed)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
41. 0.000 0.000 ↓ 0.0 0

CTE Scan on preadvsmy preadv (cost=0.00..0.03 rows=1 width=120) (never executed)

  • Filter: (((cmpcod)::text = 'AA'::text) AND (fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text))
42. 0.000 0.000 ↓ 0.0 0

Index Only Scan using fltoprseg_pk on fltoprseg fltseg (cost=0.43..4.46 rows=1 width=18) (never executed)

  • Index Cond: ((fltnum = (fltmst.fltnum)::text) AND (fltnum = '0030'::text) AND (fltcaridr = fltmst.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = fltmst.fltseqnum) AND (cmpcod = (fltmst.cmpcod)::text) AND (cmpcod = 'AA'::text))
  • Heap Fetches: 0
43. 0.042 4,811.945 ↓ 5.0 35 1

Subquery Scan on *SELECT* 2 (cost=2.40..10,744.57 rows=7 width=325) (actual time=141.563..4,811.945 rows=35 loops=1)

44. 0.243 4,811.903 ↓ 5.0 35 1

Nested Loop Left Join (cost=2.40..10,744.50 rows=7 width=825) (actual time=141.561..4,811.903 rows=35 loops=1)

45. 0.162 4,811.135 ↓ 5.0 35 1

Nested Loop Left Join (cost=1.98..10,713.21 rows=7 width=720) (actual time=141.527..4,811.135 rows=35 loops=1)

  • Join Filter: (((segdtl_1.cmpcod)::text = (preadv_1.cmpcod)::text) AND (segdtl_1.fltcaridr = preadv_1.fltcaridr) AND ((segdtl_1.fltnum)::text = (preadv_1.fltnum)::text) AND (segdtl_1.fltseqnum = preadv_1.fltseqnum))
  • Rows Removed by Join Filter: 175
46. 0.073 4,733.658 ↓ 5.0 35 1

Nested Loop Left Join (cost=1.98..10,712.98 rows=7 width=698) (actual time=64.378..4,733.658 rows=35 loops=1)

47. 0.036 11.501 ↓ 9.0 9 1

Nested Loop (cost=1.14..2,230.41 rows=1 width=702) (actual time=0.120..11.501 rows=9 loops=1)

  • Join Filter: ((fltmst_1.fltseqnum = fltcon_1.fltseqnum) AND (fltleg_1.legsernum = fltcon_1.legsernum) AND (uldseg_1.segsernum = fltcon_1.segsernum))
  • Rows Removed by Join Filter: 36
48. 0.026 6.875 ↓ 5.0 5 1

Nested Loop (cost=1.14..2,028.46 rows=1 width=721) (actual time=0.074..6.875 rows=5 loops=1)

  • Join Filter: (fltmst_1.fltseqnum = uldseg_1.fltseqnum)
  • Rows Removed by Join Filter: 25
49. 0.033 0.033 ↓ 3.0 6 1

Index Only Scan using maluldseg_pk on maluldseg uldseg_1 (cost=0.28..4.43 rows=2 width=33) (actual time=0.020..0.033 rows=6 loops=1)

  • Index Cond: ((cmpcod = 'AA'::text) AND (fltcaridr = '1001'::numeric) AND (fltnum = '0030'::text))
  • Filter: ((uldnum)::text ~~ '%BULK-%'::text)
  • Heap Fetches: 0
50. 0.022 6.816 ↓ 5.0 5 6

Materialize (cost=0.85..2,024.01 rows=1 width=688) (actual time=0.009..1.136 rows=5 loops=6)

51. 0.009 6.794 ↓ 5.0 5 1

Nested Loop Left Join (cost=0.85..2,024.00 rows=1 width=688) (actual time=0.048..6.794 rows=5 loops=1)

  • Join Filter: (((fltleg_1.cmpcod)::text = (dwsmst_1.cmpcod)::text) AND ((fltleg_1.fltnum)::text = (dwsmst_1.fltnum)::text) AND (fltleg_1.fltcaridr = dwsmst_1.fltcaridr) AND ((fltleg_1.legorg)::text = (dwsmst_1.arpcod)::text) AND (fltleg_1.fltseqnum = dwsmst_1.fltseqnum) AND (fltleg_1.legsernum = dwsmst_1.legsernum))
52. 0.019 6.780 ↓ 5.0 5 1

Nested Loop (cost=0.85..2,013.38 rows=1 width=137) (actual time=0.043..6.780 rows=5 loops=1)

  • Join Filter: (fltleg_1.fltseqnum = fltmst_1.fltseqnum)
53. 0.021 6.706 ↓ 5.0 5 1

Nested Loop (cost=0.43..2,004.91 rows=1 width=89) (actual time=0.025..6.706 rows=5 loops=1)

54. 6.620 6.620 ↓ 5.0 5 1

Seq Scan on malflt malflt_1 (cost=0.00..1,996.44 rows=1 width=28) (actual time=0.003..6.620 rows=5 loops=1)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
  • Rows Removed by Filter: 59867
55. 0.065 0.065 ↑ 1.0 1 5

Index Scan using fltoprleg_ind5 on fltoprleg fltleg_1 (cost=0.43..8.46 rows=1 width=61) (actual time=0.013..0.013 rows=1 loops=5)

  • Index Cond: ((fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text) AND (fltseqnum = malflt_1.fltseqnum) AND ((legorg)::text = 'DFW'::text))
  • Filter: (((cmpcod)::text = 'AA'::text) AND (malflt_1.legsernum = legsernum))
56. 0.055 0.055 ↑ 1.0 1 5

Index Scan using fltoprmst_pk on fltoprmst fltmst_1 (cost=0.43..8.46 rows=1 width=48) (actual time=0.011..0.011 rows=1 loops=5)

  • Index Cond: (((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = malflt_1.fltseqnum) AND ((cmpcod)::text = 'AA'::text))
  • Filter: ((fltsta)::text <> 'CAN'::text)
57. 0.005 0.005 ↓ 0.0 0 5

Seq Scan on oprdwsmst dwsmst_1 (cost=0.00..10.60 rows=1 width=680) (actual time=0.001..0.001 rows=0 loops=5)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
58. 4.590 4.590 ↓ 9.0 9 5

Seq Scan on malfltcon fltcon_1 (cost=0.00..201.93 rows=1 width=40) (actual time=0.023..0.918 rows=9 loops=5)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((asgprt)::text = 'DFW'::text) AND ((contyp)::text = 'B'::text) AND ((acpflg)::text = 'Y'::text))
  • Rows Removed by Filter: 4228
59. 0.237 4,722.084 ↓ 4.0 4 9

Nested Loop Left Join (cost=0.84..8,482.57 rows=1 width=43) (actual time=81.616..524.676 rows=4 loops=9)

60. 0.207 0.207 ↓ 4.0 4 9

Index Only Scan using maluldsegdtl_pk on maluldsegdtl segdtl_1 (cost=0.42..4.46 rows=1 width=39) (actual time=0.015..0.023 rows=4 loops=9)

  • Index Cond: ((cmpcod = (uldseg_1.cmpcod)::text) AND (cmpcod = 'AA'::text) AND (fltcaridr = uldseg_1.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltnum = (uldseg_1.fltnum)::text) AND (fltnum = '0030'::text) AND (fltseqnum = uldseg_1.fltseqnum) AND (segsernum = uldseg_1.segsernum) AND (uldnum = (uldseg_1.uldnum)::text))
  • Heap Fetches: 0
61. 4,721.640 4,721.640 ↑ 1.0 1 35

Index Scan using malmst_ind8 on malmst malmst_1 (cost=0.42..8,478.10 rows=1 width=14) (actual time=81.904..134.904 rows=1 loops=35)

  • Index Cond: (((segdtl_1.cmpcod)::text = (cmpcod)::text) AND ((cmpcod)::text = 'AA'::text))
  • Filter: (segdtl_1.malseqnum = malseqnum)
  • Rows Removed by Filter: 345451
62. 77.315 77.315 ↓ 6.0 6 35

CTE Scan on preadvsmy preadv_1 (cost=0.00..0.03 rows=1 width=120) (actual time=2.206..2.209 rows=6 loops=35)

  • Filter: (((cmpcod)::text = 'AA'::text) AND (fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text))
63. 0.525 0.525 ↑ 1.0 1 35

Index Only Scan using fltoprseg_pk on fltoprseg fltseg_1 (cost=0.43..4.46 rows=1 width=18) (actual time=0.015..0.015 rows=1 loops=35)

  • Index Cond: ((fltnum = (fltmst_1.fltnum)::text) AND (fltnum = '0030'::text) AND (fltcaridr = fltmst_1.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = fltmst_1.fltseqnum) AND (cmpcod = (fltmst_1.cmpcod)::text) AND (cmpcod = 'AA'::text))
  • Heap Fetches: 0
64. 0.013 7.277 ↓ 4.7 28 1

Subquery Scan on *SELECT* 3 (cost=1.28..2,309.41 rows=6 width=375) (actual time=6.673..7.277 rows=28 loops=1)

65. 0.101 7.264 ↓ 4.7 28 1

Nested Loop Anti Join (cost=1.28..2,309.29 rows=6 width=787) (actual time=6.669..7.264 rows=28 loops=1)

  • Join Filter: (((fltleg_2.cmpcod)::text = (fltcon_2.cmpcod)::text) AND ((fltleg_2.legorg)::text = (fltcon_2.asgprt)::text) AND (fltleg_2.fltcaridr = fltcon_2.fltcaridr) AND ((fltleg_2.fltnum)::text = (fltcon_2.fltnum)::text) AND (fltleg_2.fltseqnum = fltcon_2.fltseqnum))
  • Rows Removed by Join Filter: 269
66. 0.019 6.173 ↓ 5.5 33 1

Nested Loop Left Join (cost=1.28..2,117.80 rows=6 width=675) (actual time=5.670..6.173 rows=33 loops=1)

  • Join Filter: (((fltleg_2.cmpcod)::text = (dwsmst_2.cmpcod)::text) AND ((fltleg_2.fltnum)::text = (dwsmst_2.fltnum)::text) AND (fltleg_2.fltcaridr = dwsmst_2.fltcaridr) AND ((fltleg_2.legorg)::text = (dwsmst_2.arpcod)::text) AND (fltleg_2.fltseqnum = dwsmst_2.fltseqnum) AND (fltleg_2.legsernum = dwsmst_2.legsernum))
67. 0.035 6.154 ↓ 5.5 33 1

Nested Loop Left Join (cost=1.28..2,107.04 rows=6 width=111) (actual time=5.663..6.154 rows=33 loops=1)

68. 0.057 5.921 ↓ 5.5 33 1

Nested Loop Left Join (cost=0.85..2,080.22 rows=6 width=111) (actual time=5.627..5.921 rows=33 loops=1)

  • Join Filter: (((fltleg_2.fltnum)::text = (malflt_2.fltnum)::text) AND (fltleg_2.fltcaridr = malflt_2.fltcaridr) AND ((fltleg_2.legorg)::text = (malflt_2.arpcod)::text) AND (fltleg_2.fltseqnum = malflt_2.fltseqnum) AND (fltleg_2.legsernum = malflt_2.legsernum))
  • Rows Removed by Join Filter: 160
69. 0.044 0.320 ↓ 5.5 33 1

Nested Loop (cost=0.85..233.30 rows=6 width=109) (actual time=0.088..0.320 rows=33 loops=1)

70. 0.078 0.078 ↓ 1.7 33 1

Index Scan using fltoprleg_ind5 on fltoprleg fltleg_2 (cost=0.43..72.54 rows=19 width=61) (actual time=0.061..0.078 rows=33 loops=1)

  • Index Cond: ((fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text) AND ((legorg)::text = 'DFW'::text))
  • Filter: ((cmpcod)::text = 'AA'::text)
71. 0.198 0.198 ↑ 1.0 1 33

Index Scan using fltoprmst_pk on fltoprmst fltmst_2 (cost=0.43..8.46 rows=1 width=48) (actual time=0.006..0.006 rows=1 loops=33)

  • Index Cond: (((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = fltleg_2.fltseqnum) AND ((cmpcod)::text = 'AA'::text))
  • Filter: ((fltsta)::text <> 'CAN'::text)
72. 0.019 5.544 ↓ 5.0 5 33

Materialize (cost=0.00..1,846.77 rows=1 width=25) (actual time=0.000..0.168 rows=5 loops=33)

73. 5.525 5.525 ↓ 5.0 5 1

Seq Scan on malflt malflt_2 (cost=0.00..1,846.76 rows=1 width=25) (actual time=0.007..5.525 rows=5 loops=1)

  • Filter: (((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
  • Rows Removed by Filter: 59867
74. 0.198 0.198 ↑ 1.0 1 33

Index Only Scan using fltoprseg_pk on fltoprseg fltseg_2 (cost=0.43..4.46 rows=1 width=18) (actual time=0.006..0.006 rows=1 loops=33)

  • Index Cond: ((fltnum = (fltmst_2.fltnum)::text) AND (fltnum = '0030'::text) AND (fltcaridr = fltmst_2.fltcaridr) AND (fltcaridr = '1001'::numeric) AND (fltseqnum = fltmst_2.fltseqnum) AND (cmpcod = (fltmst_2.cmpcod)::text) AND (cmpcod = 'AA'::text))
  • Heap Fetches: 0
75. 0.000 0.000 ↓ 0.0 0 33

Materialize (cost=0.00..10.61 rows=1 width=680) (actual time=0.000..0.000 rows=0 loops=33)

76. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on oprdwsmst dwsmst_2 (cost=0.00..10.60 rows=1 width=680) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((fltnum)::text = '0030'::text) AND (fltcaridr = '1001'::numeric) AND ((arpcod)::text = 'DFW'::text))
77. 0.005 0.990 ↓ 8.0 8 33

Materialize (cost=0.00..191.34 rows=1 width=22) (actual time=0.001..0.030 rows=8 loops=33)

78. 0.985 0.985 ↓ 9.0 9 1

Seq Scan on malfltcon fltcon_2 (cost=0.00..191.33 rows=1 width=22) (actual time=0.030..0.985 rows=9 loops=1)

  • Filter: (((cmpcod)::text = 'AA'::text) AND ((asgprt)::text = 'DFW'::text) AND (fltcaridr = '1001'::numeric) AND ((fltnum)::text = '0030'::text) AND ((acpflg)::text = 'Y'::text))
  • Rows Removed by Filter: 4228
Planning time : 32.459 ms
Execution time : 4,832.737 ms