explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 976F

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 15,668.170 ↑ 1.0 1 1

Limit (cost=74,683.58..74,683.59 rows=1 width=192) (actual time=15,668.169..15,668.170 rows=1 loops=1)

2.          

Initplan (for Limit)

3. 0.223 3.071 ↑ 1.0 1 1

Aggregate (cost=9,315.58..9,315.59 rows=1 width=32) (actual time=3.071..3.071 rows=1 loops=1)

4. 0.103 2.848 ↑ 126.9 1,119 1

Nested Loop (cost=0.70..8,960.68 rows=141,960 width=6) (actual time=0.685..2.848 rows=1,119 loops=1)

5. 0.649 1.429 ↑ 2.5 188 1

Nested Loop (cost=0.28..106.29 rows=463 width=8) (actual time=0.669..1.429 rows=188 loops=1)

  • Join Filter: (dt.doc_type_id = d.doc_type_id)
  • Rows Removed by Join Filter: 1,754
6. 0.780 0.780 ↓ 1.0 1,942 1

Index Scan using t_doc_pkey on t_doc d (cost=0.28..77.44 rows=1,853 width=12) (actual time=0.013..0.780 rows=1,942 loops=1)

  • Filter: (NOT deleted)
7. 0.000 0.000 ↑ 1.0 1 1,942

Materialize (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=1,942)

8. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on t_doc_type dt (cost=0.00..1.05 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((brief)::text = 'OUTDOC'::text)
  • Rows Removed by Filter: 3
9. 1.316 1.316 ↑ 68.5 6 188

Index Scan using doc_id_idx on t_tran tr (cost=0.42..15.01 rows=411 width=14) (actual time=0.003..0.007 rows=6 loops=188)

  • Index Cond: (doc_id = d.doc_id)
  • Filter: (NOT deleted)
10. 0.648 15,589.451 ↑ 1.0 1 1

Aggregate (cost=54,818.96..54,818.97 rows=1 width=32) (actual time=15,589.451..15,589.451 rows=1 loops=1)

11. 531.631 15,588.803 ↑ 423.1 1,136 1

Merge Left Join (cost=45,346.29..53,617.26 rows=480,677 width=6) (actual time=13,932.188..15,588.803 rows=1,136 loops=1)

  • Merge Cond: ((tr_1.barcode)::text = (tr_1_1.barcode)::text)
12. 5.178 8.791 ↑ 126.9 1,119 1

Sort (cost=22,531.70..22,886.60 rows=141,960 width=13) (actual time=8.535..8.791 rows=1,119 loops=1)

  • Sort Key: tr_1.barcode
  • Sort Method: quicksort Memory: 101kB
13. 0.346 3.613 ↑ 126.9 1,119 1

Nested Loop (cost=0.70..8,960.68 rows=141,960 width=13) (actual time=1.091..3.613 rows=1,119 loops=1)

14. 0.899 1.951 ↑ 2.5 188 1

Nested Loop (cost=0.28..106.29 rows=463 width=8) (actual time=1.071..1.951 rows=188 loops=1)

  • Join Filter: (dt_1.doc_type_id = d_1.doc_type_id)
  • Rows Removed by Join Filter: 1,754
15. 1.052 1.052 ↓ 1.0 1,942 1

Index Scan using t_doc_pkey on t_doc d_1 (cost=0.28..77.44 rows=1,853 width=12) (actual time=0.014..1.052 rows=1,942 loops=1)

  • Filter: (NOT deleted)
16. 0.000 0.000 ↑ 1.0 1 1,942

Materialize (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=1,942)

17. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_1 (cost=0.00..1.05 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((brief)::text = 'OUTDOC'::text)
  • Rows Removed by Filter: 3
18. 1.316 1.316 ↑ 68.5 6 188

Index Scan using doc_id_idx on t_tran tr_1 (cost=0.42..15.01 rows=411 width=21) (actual time=0.005..0.007 rows=6 loops=188)

  • Index Cond: (doc_id = d_1.doc_id)
  • Filter: (NOT deleted)
19. 164.198 15,048.381 ↓ 4.1 581,790 1

Materialize (cost=22,814.60..23,524.40 rows=141,960 width=19) (actual time=13,820.123..15,048.381 rows=581,790 loops=1)

20. 9,287.082 14,884.183 ↓ 4.1 581,783 1

Sort (cost=22,814.60..23,169.50 rows=141,960 width=19) (actual time=13,820.119..14,884.183 rows=581,783 loops=1)

  • Sort Key: tr_1_1.barcode
  • Sort Method: external merge Disk: 17,696kB
21. 179.325 5,597.101 ↓ 4.1 582,889 1

Nested Loop (cost=0.70..8,960.68 rows=141,960 width=19) (actual time=0.065..5,597.101 rows=582,889 loops=1)

22. 2.868 5.962 ↓ 3.7 1,734 1

Nested Loop (cost=0.28..106.29 rows=463 width=8) (actual time=0.047..5.962 rows=1,734 loops=1)

  • Join Filter: (dt_1_1.doc_type_id = d_1_1.doc_type_id)
  • Rows Removed by Join Filter: 208
23. 3.094 3.094 ↓ 1.0 1,942 1

Index Scan using t_doc_pkey on t_doc d_1_1 (cost=0.28..77.44 rows=1,853 width=12) (actual time=0.020..3.094 rows=1,942 loops=1)

  • Filter: (NOT deleted)
24. 0.000 0.000 ↑ 1.0 1 1,942

Materialize (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=1,942)

25. 0.019 0.019 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_1_1 (cost=0.00..1.05 rows=1 width=4) (actual time=0.013..0.019 rows=1 loops=1)

  • Filter: ((brief)::text = 'INDOC'::text)
  • Rows Removed by Filter: 3
26. 5,411.814 5,411.814 ↑ 1.2 336 1,734

Index Scan using doc_id_idx on t_tran tr_1_1 (cost=0.42..15.01 rows=411 width=27) (actual time=0.025..3.121 rows=336 loops=1,734)

  • Index Cond: (doc_id = d_1_1.doc_id)
  • Filter: (NOT deleted)
27. 0.009 1.474 ↑ 1.0 1 1

Aggregate (cost=9,315.58..9,315.59 rows=1 width=32) (actual time=1.474..1.474 rows=1 loops=1)

28. 0.011 1.465 ↑ 7,098.0 20 1

Nested Loop (cost=0.70..8,960.68 rows=141,960 width=6) (actual time=0.723..1.465 rows=20 loops=1)

29. 0.614 1.374 ↑ 23.1 20 1

Nested Loop (cost=0.28..106.29 rows=463 width=8) (actual time=0.703..1.374 rows=20 loops=1)

  • Join Filter: (dt_2.doc_type_id = d_2.doc_type_id)
  • Rows Removed by Join Filter: 1,922
30. 0.760 0.760 ↓ 1.0 1,942 1

Index Scan using t_doc_pkey on t_doc d_2 (cost=0.28..77.44 rows=1,853 width=12) (actual time=0.020..0.760 rows=1,942 loops=1)

  • Filter: (NOT deleted)
31. 0.000 0.000 ↑ 1.0 1 1,942

Materialize (cost=0.00..1.05 rows=1 width=4) (actual time=0.000..0.000 rows=1 loops=1,942)

32. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_2 (cost=0.00..1.05 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=1)

  • Filter: ((brief)::text = 'BONUS_SELL'::text)
  • Rows Removed by Filter: 3
33. 0.080 0.080 ↑ 411.0 1 20

Index Scan using doc_id_idx on t_tran tr_2 (cost=0.42..15.01 rows=411 width=14) (actual time=0.004..0.004 rows=1 loops=20)

  • Index Cond: (doc_id = d_2.doc_id)
  • Filter: (NOT deleted)
34. 0.260 1.032 ↑ 1.0 1 1

Aggregate (cost=129.19..129.20 rows=1 width=8) (actual time=1.032..1.032 rows=1 loops=1)

35. 0.772 0.772 ↓ 1.0 2,908 1

Seq Scan on t_user (cost=0.00..121.95 rows=2,895 width=0) (actual time=0.007..0.772 rows=2,908 loops=1)

  • Filter: (NOT deleted)
36. 0.021 0.648 ↑ 1.0 1 1

Aggregate (cost=63.77..63.77 rows=1 width=8) (actual time=0.647..0.648 rows=1 loops=1)

37. 0.207 0.627 ↑ 2.5 188 1

Hash Join (cost=1.06..62.61 rows=463 width=0) (actual time=0.026..0.627 rows=188 loops=1)

  • Hash Cond: (d_3.doc_type_id = dt_3.doc_type_id)
38. 0.415 0.415 ↓ 1.0 1,942 1

Seq Scan on t_doc d_3 (cost=0.00..51.53 rows=1,853 width=4) (actual time=0.005..0.415 rows=1,942 loops=1)

  • Filter: (NOT deleted)
39. 0.002 0.005 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
40. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_3 (cost=0.00..1.05 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Filter: ((brief)::text = 'OUTDOC'::text)
  • Rows Removed by Filter: 3
41. 0.249 1.700 ↑ 1.0 1 1

Aggregate (cost=63.77..63.77 rows=1 width=8) (actual time=1.700..1.700 rows=1 loops=1)

42. 0.635 1.451 ↓ 3.7 1,734 1

Hash Join (cost=1.06..62.61 rows=463 width=0) (actual time=0.016..1.451 rows=1,734 loops=1)

  • Hash Cond: (d_4.doc_type_id = dt_4.doc_type_id)
43. 0.812 0.812 ↓ 1.0 1,942 1

Seq Scan on t_doc d_4 (cost=0.00..51.53 rows=1,853 width=4) (actual time=0.004..0.812 rows=1,942 loops=1)

  • Filter: (NOT deleted)
44. 0.001 0.004 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
45. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_4 (cost=0.00..1.05 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=1)

  • Filter: ((brief)::text = 'INDOC'::text)
  • Rows Removed by Filter: 3
46. 0.010 1.118 ↑ 1.0 1 1

Aggregate (cost=63.77..63.77 rows=1 width=8) (actual time=1.118..1.118 rows=1 loops=1)

47. 0.324 1.108 ↑ 23.1 20 1

Hash Join (cost=1.06..62.61 rows=463 width=0) (actual time=0.040..1.108 rows=20 loops=1)

  • Hash Cond: (d_5.doc_type_id = dt_5.doc_type_id)
48. 0.772 0.772 ↓ 1.0 1,942 1

Seq Scan on t_doc d_5 (cost=0.00..51.53 rows=1,853 width=4) (actual time=0.009..0.772 rows=1,942 loops=1)

  • Filter: (NOT deleted)
49. 0.003 0.012 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
50. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_5 (cost=0.00..1.05 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Filter: ((brief)::text = 'BONUS_SELL'::text)
  • Rows Removed by Filter: 3
51. 0.008 0.045 ↑ 1.0 1 1

Aggregate (cost=2.09..2.10 rows=1 width=8) (actual time=0.045..0.045 rows=1 loops=1)

52. 0.010 0.037 ↓ 35.0 35 1

Nested Loop (cost=0.00..2.08 rows=1 width=0) (actual time=0.020..0.037 rows=35 loops=1)

  • Join Filter: (ttt.task_type_id = tt.type_id)
53. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on t_task_type ttt (cost=0.00..1.06 rows=1 width=4) (actual time=0.009..0.010 rows=1 loops=1)

  • Filter: (brief = 'FEEDBACK'::text)
  • Rows Removed by Filter: 4
54. 0.017 0.017 ↓ 35.0 35 1

Seq Scan on t_task tt (cost=0.00..1.01 rows=1 width=4) (actual time=0.009..0.017 rows=35 loops=1)

  • Filter: (NOT deleted)
55. 0.005 0.067 ↑ 1.0 1 1

Aggregate (cost=7.80..7.81 rows=1 width=8) (actual time=0.067..0.067 rows=1 loops=1)

56. 0.031 0.062 ↑ 1.2 12 1

Hash Join (cost=1.02..7.76 rows=15 width=0) (actual time=0.039..0.062 rows=12 loops=1)

  • Hash Cond: (c.content_type_id = ct.content_type_id)
57. 0.021 0.021 ↑ 1.4 33 1

Seq Scan on t_content c (cost=0.00..6.45 rows=45 width=4) (actual time=0.008..0.021 rows=33 loops=1)

58. 0.003 0.010 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
59. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on t_content_type ct (cost=0.00..1.01 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Filter: ((brief)::text = 'NEWS'::text)
  • Rows Removed by Filter: 4
60. 0.007 0.043 ↑ 1.0 1 1

Aggregate (cost=7.80..7.81 rows=1 width=8) (actual time=0.043..0.043 rows=1 loops=1)

61. 0.019 0.036 ↑ 7.5 2 1

Hash Join (cost=1.02..7.76 rows=15 width=0) (actual time=0.033..0.036 rows=2 loops=1)

  • Hash Cond: (c_1.content_type_id = ct_1.content_type_id)
62. 0.011 0.011 ↑ 1.4 33 1

Seq Scan on t_content c_1 (cost=0.00..6.45 rows=45 width=4) (actual time=0.003..0.011 rows=33 loops=1)

63. 0.001 0.006 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
64. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on t_content_type ct_1 (cost=0.00..1.01 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: ((brief)::text = 'ARTICLES'::text)
  • Rows Removed by Filter: 4
65. 0.005 0.060 ↑ 1.0 1 1

Aggregate (cost=7.80..7.81 rows=1 width=8) (actual time=0.060..0.060 rows=1 loops=1)

66. 0.035 0.055 ↓ 1.1 17 1

Hash Join (cost=1.02..7.76 rows=15 width=0) (actual time=0.034..0.055 rows=17 loops=1)

  • Hash Cond: (c_2.content_type_id = ct_2.content_type_id)
67. 0.013 0.013 ↑ 1.4 33 1

Seq Scan on t_content c_2 (cost=0.00..6.45 rows=45 width=4) (actual time=0.004..0.013 rows=33 loops=1)

68. 0.003 0.007 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
69. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on t_content_type ct_2 (cost=0.00..1.01 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: ((brief)::text = 'INSTRUCTIONAL_VIDEOS'::text)
  • Rows Removed by Filter: 4
70. 0.005 1.848 ↑ 1.0 1 1

Aggregate (cost=257.51..257.52 rows=1 width=8) (actual time=1.848..1.848 rows=1 loops=1)

71. 0.567 1.843 ↑ 40.6 8 1

Hash Join (cost=1.12..256.69 rows=325 width=0) (actual time=0.044..1.843 rows=8 loops=1)

  • Hash Cond: (s.type_id = st.subject_type_id)
72. 1.267 1.267 ↓ 1.0 2,931 1

Seq Scan on t_subject s (cost=0.00..244.27 rows=2,927 width=4) (actual time=0.010..1.267 rows=2,931 loops=1)

  • Filter: (NOT deleted)
73. 0.001 0.009 ↑ 1.0 1 1

Hash (cost=1.11..1.11 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
74. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on t_subject_type st (cost=0.00..1.11 rows=1 width=4) (actual time=0.007..0.008 rows=1 loops=1)

  • Filter: ((brief)::text = 'CUSTOMER'::text)
  • Rows Removed by Filter: 4
75. 0.003 0.962 ↑ 1.0 1 1

Aggregate (cost=257.51..257.52 rows=1 width=8) (actual time=0.962..0.962 rows=1 loops=1)

76. 0.316 0.959 ↑ 54.2 6 1

Hash Join (cost=1.12..256.69 rows=325 width=0) (actual time=0.043..0.959 rows=6 loops=1)

  • Hash Cond: (s_1.type_id = st_1.subject_type_id)
77. 0.636 0.636 ↓ 1.0 2,931 1

Seq Scan on t_subject s_1 (cost=0.00..244.27 rows=2,927 width=4) (actual time=0.007..0.636 rows=2,931 loops=1)

  • Filter: (NOT deleted)
78. 0.001 0.007 ↑ 1.0 1 1

Hash (cost=1.11..1.11 rows=1 width=4) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
79. 0.006 0.006 ↑ 1.0 1 1

Seq Scan on t_subject_type st_1 (cost=0.00..1.11 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=1)

  • Filter: ((brief)::text = 'SELLER'::text)
  • Rows Removed by Filter: 4
80. 0.222 4.525 ↑ 1.0 1 1

Aggregate (cost=267.47..267.48 rows=1 width=8) (actual time=4.525..4.525 rows=1 loops=1)

81. 0.000 4.303 ↓ 3.7 1,734 1

Nested Loop (cost=1.34..266.31 rows=463 width=0) (actual time=0.038..4.303 rows=1,734 loops=1)

82. 0.402 0.875 ↓ 3.7 1,734 1

Hash Join (cost=1.06..62.61 rows=463 width=8) (actual time=0.025..0.875 rows=1,734 loops=1)

  • Hash Cond: (d_6.doc_type_id = dt_6.doc_type_id)
83. 0.468 0.468 ↓ 1.0 1,942 1

Seq Scan on t_doc d_6 (cost=0.00..51.53 rows=1,853 width=12) (actual time=0.011..0.468 rows=1,942 loops=1)

  • Filter: (NOT deleted)
84. 0.001 0.005 ↑ 1.0 1 1

Hash (cost=1.05..1.05 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
85. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on t_doc_type dt_6 (cost=0.00..1.05 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=1)

  • Filter: ((brief)::text = 'INDOC'::text)
  • Rows Removed by Filter: 3
86. 3.468 3.468 ↑ 1.0 1 1,734

Index Scan using t_subject_pkey on t_subject s_2 (cost=0.28..0.44 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=1,734)

  • Index Cond: (subject_id = d_6.partner_id)
  • Filter: (NOT deleted)
87. 0.144 62.094 ↑ 1.0 1 1

Aggregate (cost=104.85..104.86 rows=1 width=8) (actual time=62.093..62.094 rows=1 loops=1)

88. 0.174 61.950 ↓ 2.6 1,580 1

Nested Loop (cost=0.28..103.34 rows=604 width=0) (actual time=60.118..61.950 rows=1,580 loops=1)

89. 60.039 60.039 ↑ 1.0 1 1

Seq Scan on t_cat c_3 (cost=0.00..1.04 rows=1 width=4) (actual time=60.037..60.039 rows=1 loops=1)

  • Filter: ((brief)::text = 'goods'::text)
  • Rows Removed by Filter: 2
90. 1.737 1.737 ↓ 1.7 1,580 1

Index Only Scan using cat_idx on t_item i (cost=0.28..93.25 rows=906 width=4) (actual time=0.075..1.737 rows=1,580 loops=1)

  • Index Cond: (cat_id = c_3.cat_id)
  • Heap Fetches: 1,580
91. 15,668.167 15,668.167 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=192) (actual time=15,668.167..15,668.167 rows=1 loops=1)

Planning time : 4.826 ms
Execution time : 15,675.439 ms