explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7f6I

Settings
# exclusive inclusive rows x rows loops node
1. 0.796 63.565 ↑ 1.0 1 1

Aggregate (cost=2,949.63..2,949.64 rows=1 width=32) (actual time=63.565..63.565 rows=1 loops=1)

2. 0.069 62.769 ↑ 1.0 20 1

Subquery Scan on tt (cost=1.67..2,949.57 rows=20 width=2,048) (actual time=8.881..62.769 rows=20 loops=1)

3. 0.012 62.700 ↑ 1.0 20 1

Limit (cost=1.67..2,949.37 rows=20 width=2,776) (actual time=8.871..62.700 rows=20 loops=1)

4.          

Initplan (for Limit)

5. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on t_object_type ot (cost=0.00..1.11 rows=1 width=4) (actual time=0.006..0.007 rows=1 loops=1)

  • Filter: ((brief)::text = 'ITEM'::text)
  • Rows Removed by Filter: 8
6. 1.506 62.681 ↑ 84.0 20 1

WindowAgg (cost=0.56..247,755.19 rows=1,681 width=2,776) (actual time=8.870..62.681 rows=20 loops=1)

7. 1.168 6.575 ↑ 1.2 1,458 1

Nested Loop Left Join (cost=0.56..933.17 rows=1,681 width=1,959) (actual time=0.055..6.575 rows=1,458 loops=1)

  • Join Filter: (i.item_id = ic.item_id)
  • Rows Removed by Join Filter: 4,371
8. 0.000 5.407 ↑ 1.2 1,458 1

Nested Loop Left Join (cost=0.56..856.49 rows=1,681 width=1,541) (actual time=0.049..5.407 rows=1,458 loops=1)

9. 0.533 2.546 ↑ 1.2 1,458 1

Nested Loop Left Join (cost=0.28..278.36 rows=1,681 width=1,536) (actual time=0.038..2.546 rows=1,458 loops=1)

  • Join Filter: (i.manufacturer_id = m.manufacturer_id)
  • Rows Removed by Join Filter: 28
10. 0.886 2.013 ↑ 1.2 1,458 1

Nested Loop Left Join (cost=0.28..252.13 rows=1,681 width=1,508) (actual time=0.034..2.013 rows=1,458 loops=1)

  • Join Filter: (c.cat_id = i.cat_id)
  • Rows Removed by Join Filter: 1,463
11. 1.127 1.127 ↑ 1.2 1,458 1

Index Scan Backward using t_item_pkey on t_item i (cost=0.28..188.05 rows=1,681 width=472) (actual time=0.023..1.127 rows=1,458 loops=1)

  • Filter: (NOT is_disabled)
  • Rows Removed by Filter: 128
12. 0.000 0.000 ↑ 1.5 2 1,458

Materialize (cost=0.00..1.04 rows=3 width=1,036) (actual time=0.000..0.000 rows=2 loops=1,458)

13. 0.006 0.006 ↑ 1.0 3 1

Seq Scan on t_cat c (cost=0.00..1.03 rows=3 width=1,036) (actual time=0.005..0.006 rows=3 loops=1)

14. 0.000 0.000 ↑ 1.0 1 1,458

Materialize (cost=0.00..1.01 rows=1 width=36) (actual time=0.000..0.000 rows=1 loops=1,458)

15. 0.003 0.003 ↑ 1.0 1 1

Seq Scan on t_manufacturer m (cost=0.00..1.01 rows=1 width=36) (actual time=0.002..0.003 rows=1 loops=1)

16. 2.916 2.916 ↑ 1.0 1 1,458

Index Scan using pl_item on t_pline p (cost=0.28..0.34 rows=1 width=13) (actual time=0.002..0.002 rows=1 loops=1,458)

  • Index Cond: ((item_id = i.item_id) AND (pl_id = 1))
17. 0.000 0.000 ↑ 1.0 3 1,458

Materialize (cost=0.00..1.04 rows=3 width=426) (actual time=0.000..0.000 rows=3 loops=1,458)

18. 0.003 0.003 ↑ 1.0 3 1

Seq Scan on t_icode ic (cost=0.00..1.03 rows=3 width=426) (actual time=0.002..0.003 rows=3 loops=1)

19.          

SubPlan (for WindowAgg)

20. 0.034 6.980 ↓ 0.0 0 20

Nested Loop (cost=0.00..54.27 rows=1 width=516) (actual time=0.306..0.349 rows=0 loops=20)

  • Join Filter: (ip.prop_value_id = pv.prop_value_id)
  • Rows Removed by Join Filter: 2
21. 0.040 6.940 ↓ 0.0 0 20

Nested Loop (cost=0.00..52.97 rows=1 width=4) (actual time=0.304..0.347 rows=0 loops=20)

  • Join Filter: (ip.prop_id = p_1.prop_id)
  • Rows Removed by Join Filter: 1
22. 0.080 0.080 ↑ 1.0 1 20

Seq Scan on t_prop p_1 (cost=0.00..1.09 rows=1 width=4) (actual time=0.002..0.004 rows=1 loops=20)

  • Filter: ((brief)::text = 'GROUP'::text)
  • Rows Removed by Filter: 7
23. 6.820 6.820 ↑ 2.0 1 20

Seq Scan on t_item_prop ip (cost=0.00..51.86 rows=2 width=8) (actual time=0.241..0.341 rows=1 loops=20)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 2,662
24. 0.006 0.006 ↑ 1.2 11 3

Seq Scan on t_prop_value pv (cost=0.00..1.13 rows=13 width=520) (actual time=0.001..0.002 rows=11 loops=3)

25. 0.960 46.140 ↑ 1.0 1 20

Aggregate (cost=77.80..77.81 rows=1 width=32) (actual time=2.307..2.307 rows=1 loops=20)

26. 0.296 45.180 ↓ 1.2 5 20

Nested Loop (cost=1.16..77.78 rows=4 width=1,176) (actual time=0.314..2.259 rows=5 loops=20)

  • Join Filter: (p_2.prop_id = cp.prop_id)
  • Rows Removed by Join Filter: 36
27. 0.388 44.260 ↓ 5.0 5 20

Nested Loop Left Join (cost=0.00..54.26 rows=1 width=624) (actual time=0.306..2.213 rows=5 loops=20)

  • Join Filter: (pv_1.prop_value_id = ip_1.prop_value_id)
  • Rows Removed by Join Filter: 73
28. 0.300 43.560 ↓ 5.0 5 20

Nested Loop Left Join (cost=0.00..52.96 rows=1 width=108) (actual time=0.300..2.178 rows=5 loops=20)

  • Join Filter: (ip_1.prop_id = cp.prop_id)
  • Rows Removed by Join Filter: 6
29. 0.100 0.100 ↓ 5.0 5 20

Seq Scan on t_cat_prop cp (cost=0.00..1.07 rows=1 width=4) (actual time=0.002..0.005 rows=5 loops=20)

  • Filter: (cat_id = i.cat_id)
  • Rows Removed by Filter: 3
30. 43.160 43.160 ↑ 2.0 1 104

Seq Scan on t_item_prop ip_1 (cost=0.00..51.86 rows=2 width=108) (actual time=0.279..0.415 rows=1 loops=104)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 2,662
31. 0.312 0.312 ↓ 1.1 14 104

Seq Scan on t_prop_value pv_1 (cost=0.00..1.13 rows=13 width=520) (actual time=0.001..0.003 rows=14 loops=104)

32. 0.407 0.624 ↑ 3.8 8 104

Hash Join (cost=1.16..23.14 rows=30 width=556) (actual time=0.003..0.006 rows=8 loops=104)

  • Hash Cond: (pt.prop_type_id = p_2.type)
33. 0.208 0.208 ↑ 141.7 6 104

Seq Scan on t_prop_type pt (cost=0.00..18.50 rows=850 width=36) (actual time=0.001..0.002 rows=6 loops=104)

34. 0.006 0.009 ↓ 1.1 8 1

Hash (cost=1.07..1.07 rows=7 width=524) (actual time=0.009..0.009 rows=8 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
35. 0.003 0.003 ↓ 1.1 8 1

Seq Scan on t_prop p_2 (cost=0.00..1.07 rows=7 width=524) (actual time=0.002..0.003 rows=8 loops=1)

36. 0.100 1.160 ↑ 1.0 1 20

Aggregate (cost=8.61..8.62 rows=1 width=32) (actual time=0.057..0.058 rows=1 loops=20)

37. 1.060 1.060 ↓ 0.0 0 20

Seq Scan on t_item_image ii (cost=0.00..8.60 rows=1 width=47) (actual time=0.046..0.053 rows=0 loops=20)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 292
38. 0.020 0.320 ↓ 0.0 0 20

Limit (cost=0.70..6.11 rows=1 width=32) (actual time=0.015..0.016 rows=0 loops=20)

39. 0.044 0.300 ↓ 0.0 0 20

Nested Loop (cost=0.70..2,363.98 rows=437 width=32) (actual time=0.015..0.015 rows=0 loops=20)

  • Join Filter: (d.doc_type_id = dt.doc_type_id)
  • Rows Removed by Join Filter: 0
40. 0.032 0.240 ↓ 0.0 0 20

Nested Loop (cost=0.70..2,333.42 rows=1,749 width=10) (actual time=0.012..0.012 rows=0 loops=20)

41. 0.160 0.160 ↓ 0.0 0 20

Index Scan using itm_id_idx on t_tran tr (cost=0.42..1,771.31 rows=1,749 width=14) (actual time=0.008..0.008 rows=0 loops=20)

  • Index Cond: (item_id = i.item_id)
42. 0.048 0.048 ↑ 1.0 1 8

Index Scan using t_doc_pkey on t_doc d (cost=0.28..0.32 rows=1 width=12) (actual time=0.006..0.006 rows=1 loops=8)

  • Index Cond: (doc_id = tr.doc_id)
43. 0.011 0.016 ↑ 1.0 1 8

Materialize (cost=0.00..1.05 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=8)

44. 0.005 0.005 ↑ 1.0 1 1

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

  • Filter: ((brief)::text = 'INDOC'::text)
  • Rows Removed by Filter: 3
Planning time : 2.063 ms
Execution time : 63.949 ms