explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ke0 : PC2333

Settings
# exclusive inclusive rows x rows loops node
1. 0.169 478.764 ↑ 1.7 58 1

Limit (cost=19,220.98..19,226.65 rows=100 width=172) (actual time=478.309..478.764 rows=58 loops=1)

2. 0.199 478.595 ↑ 3.4 58 1

Unique (cost=19,220.98..19,232.32 rows=200 width=172) (actual time=478.303..478.595 rows=58 loops=1)

3. 0.287 478.396 ↑ 21.3 71 1

Sort (cost=19,220.98..19,224.76 rows=1,511 width=172) (actual time=478.297..478.396 rows=71 loops=1)

  • Sort Key: data2.date, data2.id
  • Sort Method: quicksort Memory: 42kB
4. 0.231 478.109 ↑ 21.3 71 1

Subquery Scan data2 (cost=19,122.31..19,141.19 rows=1,511 width=172) (actual time=477.784..478.109 rows=71 loops=1)

5. 0.334 477.878 ↑ 21.3 71 1

Sort (cost=19,122.31..19,126.08 rows=1,511 width=104) (actual time=477.776..477.878 rows=71 loops=1)

  • Sort Key: eto.emladdr_id, efr.emladdr_id
  • Sort Method: quicksort Memory: 43kB
6. 53.006 477.544 ↑ 21.3 71 1

Hash Join (cost=15,350.09..19,042.51 rows=1,511 width=104) (actual time=422.477..477.544 rows=71 loops=1)

  • Hash Cond: (efr.emladdr_eml_id = eto.emladdr_eml_id)
7. 87.669 87.669 ↓ 1.0 35,464 1

Seq Scan on emladdr efr (cost=0.00..2,838.40 rows=34,983 width=34) (actual time=0.105..87.669 rows=35,464 loops=1)

  • Filter: (emladdr_type = 'FROM'::text)
8. 0.199 336.869 ↑ 17.4 71 1

Hash (cost=15,334.67..15,334.67 rows=1,234 width=78) (actual time=336.869..336.869 rows=71 loops=1)

9. 13.350 336.670 ↑ 17.4 71 1

Hash Join (cost=14,391.23..15,334.67 rows=1,234 width=78) (actual time=323.714..336.670 rows=71 loops=1)

  • Hash Cond: (xtbatch.eml.eml_id = eto.emladdr_eml_id)
10. 0.403 139.847 ↑ 15.1 58 1

HashAggregate (cost=10,731.91..10,740.64 rows=873 width=53) (actual time=139.716..139.847 rows=58 loops=1)

11. 0.300 139.444 ↑ 8.6 102 1

Append (cost=11.54..10,725.36 rows=873 width=53) (actual time=0.331..139.444 rows=102 loops=1)

12. 0.553 3.063 ↑ 9.4 87 1

Nested Loop (cost=11.54..2,618.97 rows=819 width=53) (actual time=0.327..3.063 rows=87 loops=1)

13. 0.303 1.205 ↑ 9.4 87 1

Nested Loop (cost=11.54..2,361.20 rows=819 width=4) (actual time=0.259..1.205 rows=87 loops=1)

14. 0.023 0.215 ↓ 1.5 3 1

Nested Loop (cost=0.00..20.58 rows=2 width=4) (actual time=0.138..0.215 rows=3 loops=1)

15. 0.055 0.055 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.052..0.055 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
16. 0.137 0.137 ↓ 1.5 3 1

Index Scan using cntct_test_index on cntct (cost=0.00..12.30 rows=2 width=8) (actual time=0.073..0.137 rows=3 loops=1)

  • Index Cond: (cntct.cntct_crmacct_id = 3592)
17. 0.531 0.687 ↑ 14.3 29 3

Bitmap Heap Scan on emlassc (cost=11.54..1,165.12 rows=415 width=8) (actual time=0.089..0.229 rows=29 loops=3)

  • Recheck Cond: (xtbatch.emlassc.emlassc_assc_id = cntct.cntct_id)
  • Filter: (xtbatch.emlassc.emlassc_type = 'T'::text)
18. 0.156 0.156 ↑ 14.3 29 3

Bitmap Index Scan on emlassc_assc_id (cost=0.00..11.44 rows=415 width=0) (actual time=0.052..0.052 rows=29 loops=3)

  • Index Cond: (xtbatch.emlassc.emlassc_assc_id = cntct.cntct_id)
19. 1.305 1.305 ↑ 1.0 1 87

Index Scan using eml_pkey on eml (cost=0.00..0.30 rows=1 width=53) (actual time=0.013..0.015 rows=1 loops=87)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
20. 0.119 0.885 ↓ 15.0 15 1

Nested Loop (cost=31.25..51.82 rows=1 width=53) (actual time=0.509..0.885 rows=15 loops=1)

21. 0.100 0.691 ↓ 15.0 15 1

Nested Loop (cost=31.25..43.55 rows=1 width=57) (actual time=0.491..0.691 rows=15 loops=1)

22. 0.035 0.501 ↓ 15.0 15 1

Bitmap Heap Scan on emlassc (cost=31.25..35.26 rows=1 width=8) (actual time=0.473..0.501 rows=15 loops=1)

  • Recheck Cond: ((emlassc_assc_id = 3592) AND (emlassc_type = 'CRMA'::text))
23. 0.009 0.466 ↓ 0.0 0 1

BitmapAnd (cost=31.25..31.25 rows=1 width=0) (actual time=0.466..0.466 rows=0 loops=1)

24. 0.070 0.070 ↑ 15.9 15 1

Bitmap Index Scan on emlassc_assc_id (cost=0.00..6.11 rows=238 width=0) (actual time=0.070..0.070 rows=15 loops=1)

  • Index Cond: (emlassc_assc_id = 3592)
25. 0.387 0.387 ↓ 1.1 1,264 1

Bitmap Index Scan on emlassc_emlassc_type_idx (cost=0.00..24.88 rows=1,141 width=0) (actual time=0.387..0.387 rows=1,264 loops=1)

  • Index Cond: (emlassc_type = 'CRMA'::text)
26. 0.090 0.090 ↑ 1.0 1 15

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (actual time=0.004..0.006 rows=1 loops=15)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
27. 0.075 0.075 ↑ 1.0 1 15

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=15)

  • Index Cond: (public.crmacct.crmacct_id = 3592)
28. 0.004 0.089 ↓ 0.0 0 1

Nested Loop (cost=17.10..44.30 rows=1 width=53) (actual time=0.089..0.089 rows=0 loops=1)

29. 0.004 0.085 ↓ 0.0 0 1

Nested Loop (cost=17.10..36.02 rows=1 width=61) (actual time=0.085..0.085 rows=0 loops=1)

30. 0.014 0.081 ↓ 0.0 0 1

Nested Loop (cost=17.10..29.39 rows=1 width=12) (actual time=0.081..0.081 rows=0 loops=1)

31. 0.007 0.007 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
32. 0.003 0.060 ↓ 0.0 0 1

Bitmap Heap Scan on emlassc (cost=17.10..21.11 rows=1 width=8) (actual time=0.060..0.060 rows=0 loops=1)

  • Recheck Cond: ((xtbatch.emlassc.emlassc_type = 'C'::text) AND (xtbatch.emlassc.emlassc_assc_id = public.crmacct.crmacct_cust_id))
33. 0.008 0.057 ↓ 0.0 0 1

BitmapAnd (cost=17.10..17.10 rows=1 width=0) (actual time=0.057..0.057 rows=0 loops=1)

34. 0.030 0.030 ↑ 1.6 90 1

Bitmap Index Scan on emlassc_emlassc_type_idx (cost=0.00..5.38 rows=140 width=0) (actual time=0.030..0.030 rows=90 loops=1)

  • Index Cond: (xtbatch.emlassc.emlassc_type = 'C'::text)
35. 0.019 0.019 ↓ 0.0 0 1

Bitmap Index Scan on emlassc_assc_id (cost=0.00..11.44 rows=415 width=0) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: (xtbatch.emlassc.emlassc_assc_id = public.crmacct.crmacct_cust_id)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..6.61 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using cust_pkey on custinfo (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (custinfo.cust_id = xtbatch.emlassc.emlassc_assc_id)
38. 0.004 0.096 ↓ 0.0 0 1

Nested Loop (cost=8.28..29.79 rows=1 width=53) (actual time=0.096..0.096 rows=0 loops=1)

39. 0.004 0.092 ↓ 0.0 0 1

Nested Loop (cost=8.28..21.50 rows=1 width=4) (actual time=0.092..0.092 rows=0 loops=1)

  • Join Filter: (vendinfo.vend_id = xtbatch.emlassc.emlassc_assc_id)
40. 0.046 0.088 ↓ 0.0 0 1

Hash Join (cost=8.28..13.15 rows=1 width=8) (actual time=0.088..0.088 rows=0 loops=1)

  • Hash Cond: (vendinfo.vend_id = public.crmacct.crmacct_vend_id)
41. 0.025 0.025 ↑ 135.0 1 1

Seq Scan on vendinfo (cost=0.00..4.35 rows=135 width=4) (actual time=0.025..0.025 rows=1 loops=1)

42. 0.006 0.017 ↓ 0.0 0 1

Hash (cost=8.27..8.27 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=1)

43. 0.011 0.011 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.009..0.011 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..8.34 rows=1 width=8) (never executed)

  • Index Cond: (xtbatch.emlassc.emlassc_type = 'V'::text)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
46. 0.005 133.119 ↓ 0.0 0 1

Nested Loop (cost=6,890.03..7,794.71 rows=45 width=53) (actual time=133.119..133.119 rows=0 loops=1)

47. 13.188 133.114 ↓ 0.0 0 1

Hash Join (cost=6,890.03..7,679.87 rows=45 width=4) (actual time=133.114..133.114 rows=0 loops=1)

  • Hash Cond: (xtbatch.emlassc.emlassc_assc_id = incdt.incdt_id)
48. 58.191 58.191 ↑ 1.0 8,135 1

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..758.12 rows=8,336 width=8) (actual time=0.045..58.191 rows=8,135 loops=1)

  • Index Cond: (emlassc_type = 'INCDT'::text)
49. 0.016 61.735 ↑ 9.0 1 1

Hash (cost=6,889.92..6,889.92 rows=9 width=4) (actual time=61.735..61.735 rows=1 loops=1)

50. 0.017 61.719 ↑ 9.0 1 1

Nested Loop (cost=0.00..6,889.92 rows=9 width=4) (actual time=6.826..61.719 rows=1 loops=1)

51. 0.014 0.014 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.006..0.014 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
52. 61.688 61.688 ↑ 9.0 1 1

Seq Scan on incdt (cost=0.00..6,881.56 rows=9 width=8) (actual time=6.809..61.688 rows=1 loops=1)

  • Filter: (incdt.incdt_crmacct_id = 3592)
53. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..2.54 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
54. 0.004 0.080 ↓ 0.0 0 1

Nested Loop (cost=0.00..33.19 rows=1 width=53) (actual time=0.080..0.080 rows=0 loops=1)

55. 0.004 0.076 ↓ 0.0 0 1

Nested Loop (cost=0.00..24.91 rows=1 width=57) (actual time=0.076..0.076 rows=0 loops=1)

56. 0.003 0.072 ↓ 0.0 0 1

Nested Loop (cost=0.00..16.63 rows=1 width=57) (actual time=0.072..0.072 rows=0 loops=1)

57. 0.069 0.069 ↓ 0.0 0 1

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..8.34 rows=1 width=8) (actual time=0.069..0.069 rows=0 loops=1)

  • Index Cond: (emlassc_type = 'TODO'::text)
58. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
59. 0.000 0.000 ↓ 0.0 0

Index Scan using todoitem_pkey on todoitem (cost=0.00..8.27 rows=1 width=8) (never executed)

  • Index Cond: (todoitem.todoitem_id = xtbatch.emlassc.emlassc_assc_id)
  • Filter: (todoitem.todoitem_crmacct_id = 3592)
60. 0.000 0.000 ↓ 0.0 0

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (public.crmacct.crmacct_id = 3592)
61. 0.004 0.029 ↓ 0.0 0 1

Nested Loop (cost=0.00..33.19 rows=1 width=53) (actual time=0.029..0.029 rows=0 loops=1)

62. 0.003 0.025 ↓ 0.0 0 1

Nested Loop (cost=0.00..24.91 rows=1 width=57) (actual time=0.025..0.025 rows=0 loops=1)

63. 0.005 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.00..16.63 rows=1 width=57) (actual time=0.022..0.022 rows=0 loops=1)

64. 0.017 0.017 ↓ 0.0 0 1

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..8.34 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (emlassc_type = 'OPP'::text)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
66. 0.000 0.000 ↓ 0.0 0

Index Scan using ophead_pkey on ophead (cost=0.00..8.27 rows=1 width=8) (never executed)

  • Index Cond: (ophead.ophead_id = xtbatch.emlassc.emlassc_assc_id)
  • Filter: (ophead.ophead_crmacct_id = 3592)
67. 0.000 0.000 ↓ 0.0 0

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (public.crmacct.crmacct_id = 3592)
68. 0.004 0.021 ↓ 0.0 0 1

Nested Loop (cost=0.00..33.19 rows=1 width=53) (actual time=0.021..0.021 rows=0 loops=1)

  • Join Filter: (cohead.cohead_cust_id = public.crmacct.crmacct_cust_id)
69. 0.004 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.00..24.91 rows=1 width=57) (actual time=0.017..0.017 rows=0 loops=1)

70. 0.002 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.00..16.63 rows=1 width=57) (actual time=0.013..0.013 rows=0 loops=1)

71. 0.011 0.011 ↓ 0.0 0 1

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..8.34 rows=1 width=8) (actual time=0.011..0.011 rows=0 loops=1)

  • Index Cond: (emlassc_type = 'S'::text)
72. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
73. 0.000 0.000 ↓ 0.0 0

Index Scan using cohead_pkey on cohead (cost=0.00..8.27 rows=1 width=8) (never executed)

  • Index Cond: (cohead.cohead_id = xtbatch.emlassc.emlassc_assc_id)
74. 0.000 0.000 ↓ 0.0 0

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (never executed)

  • Index Cond: (public.crmacct.crmacct_id = 3592)
75. 0.110 1.636 ↓ 0.0 0 1

Nested Loop (cost=0.00..33.19 rows=1 width=53) (actual time=1.636..1.636 rows=0 loops=1)

  • Join Filter: (quhead.quhead_cust_id = public.crmacct.crmacct_cust_id)
76. 0.140 1.418 ↓ 18.0 18 1

Nested Loop (cost=0.00..24.91 rows=1 width=57) (actual time=0.149..1.418 rows=18 loops=1)

77. 0.180 1.089 ↓ 27.0 27 1

Nested Loop (cost=0.00..16.63 rows=1 width=57) (actual time=0.099..1.089 rows=27 loops=1)

78. 0.261 0.261 ↓ 27.0 27 1

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..8.34 rows=1 width=8) (actual time=0.034..0.261 rows=27 loops=1)

  • Index Cond: (emlassc_type = 'Q'::text)
79. 0.648 0.648 ↑ 1.0 1 27

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (actual time=0.022..0.024 rows=1 loops=27)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
80. 0.189 0.189 ↑ 1.0 1 27

Index Scan using quhead_pkey on quhead (cost=0.00..8.27 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=27)

  • Index Cond: (quhead.quhead_id = xtbatch.emlassc.emlassc_assc_id)
81. 0.108 0.108 ↑ 1.0 1 18

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=18)

  • Index Cond: (public.crmacct.crmacct_id = 3592)
82. 0.004 0.075 ↓ 0.0 0 1

Nested Loop (cost=0.00..22.20 rows=1 width=53) (actual time=0.075..0.075 rows=0 loops=1)

83. 0.003 0.071 ↓ 0.0 0 1

Nested Loop (cost=0.00..13.91 rows=1 width=4) (actual time=0.071..0.071 rows=0 loops=1)

  • Join Filter: (rahead.rahead_id = xtbatch.emlassc.emlassc_assc_id)
84. 0.030 0.068 ↓ 0.0 0 1

Nested Loop (cost=0.00..9.43 rows=1 width=4) (actual time=0.068..0.068 rows=0 loops=1)

  • Join Filter: (rahead.rahead_cust_id = public.crmacct.crmacct_cust_id)
85. 0.007 0.007 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
86. 0.031 0.031 ↑ 1.0 7 1

Seq Scan on rahead (cost=0.00..1.07 rows=7 width=8) (actual time=0.022..0.031 rows=7 loops=1)

87. 0.000 0.000 ↓ 0.0 0

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..4.48 rows=1 width=8) (never executed)

  • Index Cond: (xtbatch.emlassc.emlassc_type = 'RA'::text)
88. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
89. 0.003 0.051 ↓ 0.0 0 1

Nested Loop (cost=0.00..22.08 rows=1 width=53) (actual time=0.051..0.051 rows=0 loops=1)

90. 0.004 0.048 ↓ 0.0 0 1

Nested Loop (cost=0.00..13.80 rows=1 width=4) (actual time=0.048..0.048 rows=0 loops=1)

  • Join Filter: (pohead.pohead_id = xtbatch.emlassc.emlassc_assc_id)
91. 0.013 0.044 ↓ 0.0 0 1

Nested Loop (cost=0.00..9.31 rows=1 width=4) (actual time=0.044..0.044 rows=0 loops=1)

  • Join Filter: (pohead.pohead_vend_id = public.crmacct.crmacct_vend_id)
92. 0.007 0.007 ↑ 1.0 1 1

Index Scan using crmacct_pkey on crmacct (cost=0.00..8.27 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Index Cond: (crmacct_id = 3592)
93. 0.024 0.024 ↑ 1.0 2 1

Seq Scan on pohead (cost=0.00..1.02 rows=2 width=8) (actual time=0.020..0.024 rows=2 loops=1)

94. 0.000 0.000 ↓ 0.0 0

Index Scan using emlassc_emlassc_type_idx on emlassc (cost=0.00..4.48 rows=1 width=8) (never executed)

  • Index Cond: (xtbatch.emlassc.emlassc_type = 'P'::text)
95. 0.000 0.000 ↓ 0.0 0

Index Scan using eml_pkey on eml (cost=0.00..8.27 rows=1 width=53) (never executed)

  • Index Cond: (xtbatch.eml.eml_id = xtbatch.emlassc.emlassc_eml_id)
96. 81.886 183.473 ↑ 1.0 40,315 1

Hash (cost=2,838.40..2,838.40 rows=40,394 width=34) (actual time=183.473..183.473 rows=40,315 loops=1)

97. 101.587 101.587 ↑ 1.0 40,315 1

Seq Scan on emladdr eto (cost=0.00..2,838.40 rows=40,394 width=34) (actual time=0.007..101.587 rows=40,315 loops=1)

  • Filter: (emladdr_type = 'TO'::text)
Total runtime : 480.457 ms