explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tt1s

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 10.414 ↑ 305.0 2 1

Limit (cost=324.75..20,608.70 rows=610 width=2,558) (actual time=10.285..10.414 rows=2 loops=1)

2.          

Initplan (for Limit)

3. 0.009 0.009 ↑ 1.0 1 1

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

  • Filter: ((brief)::text = 'ITEM'::text)
  • Rows Removed by Filter: 8
4. 0.148 10.412 ↑ 305.0 2 1

WindowAgg (cost=323.64..20,607.58 rows=610 width=2,558) (actual time=10.284..10.412 rows=2 loops=1)

5. 0.004 9.882 ↑ 305.0 2 1

Nested Loop Left Join (cost=323.64..550.48 rows=610 width=1,842) (actual time=9.869..9.882 rows=2 loops=1)

6. 0.003 9.860 ↑ 305.0 2 1

Nested Loop Left Join (cost=323.36..360.52 rows=610 width=1,837) (actual time=9.854..9.860 rows=2 loops=1)

  • Join Filter: (i.manufacturer_id = m.manufacturer_id)
7. 0.004 9.839 ↑ 305.0 2 1

Nested Loop Left Join (cost=323.36..350.35 rows=610 width=1,809) (actual time=9.834..9.839 rows=2 loops=1)

  • Join Filter: (c.cat_id = i.cat_id)
  • Rows Removed by Join Filter: 4
8. 0.006 9.823 ↑ 305.0 2 1

Merge Left Join (cost=323.36..326.43 rows=610 width=773) (actual time=9.820..9.823 rows=2 loops=1)

  • Merge Cond: (i.item_id = ic.item_id)
9. 0.027 9.777 ↑ 305.0 2 1

Sort (cost=322.31..323.83 rows=610 width=355) (actual time=9.776..9.777 rows=2 loops=1)

  • Sort Key: i.item_id DESC
  • Sort Method: quicksort Memory: 25kB
10. 0.027 9.750 ↑ 305.0 2 1

Hash Left Join (cost=116.00..294.08 rows=610 width=355) (actual time=9.440..9.750 rows=2 loops=1)

  • Hash Cond: (tt.item_id = i.item_id)
11. 0.005 0.426 ↑ 305.0 2 1

Nested Loop (cost=0.42..176.91 rows=610 width=66) (actual time=0.118..0.426 rows=2 loops=1)

12. 0.006 0.399 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.00..44.88 rows=2 width=66) (actual time=0.104..0.399 rows=2 loops=1)

  • Join Filter: (dt.doc_type_id = d.doc_type_id)
  • Rows Removed by Join Filter: 6
13. 0.381 0.381 ↑ 1.0 2 1

Seq Scan on t_doc d (cost=0.00..43.71 rows=2 width=28) (actual time=0.090..0.381 rows=2 loops=1)

  • Filter: (customer_id = 1602)
  • Rows Removed by Filter: 1016
14. 0.007 0.012 ↑ 1.0 4 2

Materialize (cost=0.00..1.06 rows=4 width=46) (actual time=0.005..0.006 rows=4 loops=2)

15. 0.005 0.005 ↑ 1.0 4 1

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

16. 0.022 0.022 ↑ 375.0 1 2

Index Scan using doc_id_idx on t_tran tt (cost=0.42..62.26 rows=375 width=16) (actual time=0.010..0.011 rows=1 loops=2)

  • Index Cond: (doc_id = d.doc_id)
17. 1.335 9.297 ↓ 1.0 1,582 1

Hash (cost=95.81..95.81 rows=1,581 width=297) (actual time=9.297..9.297 rows=1,582 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 485kB
18. 7.962 7.962 ↓ 1.0 1,582 1

Seq Scan on t_item i (cost=0.00..95.81 rows=1,581 width=297) (actual time=0.006..7.962 rows=1,582 loops=1)

19. 0.031 0.040 ↑ 3.0 1 1

Sort (cost=1.05..1.06 rows=3 width=426) (actual time=0.040..0.040 rows=1 loops=1)

  • Sort Key: ic.item_id DESC
  • Sort Method: quicksort Memory: 25kB
20. 0.009 0.009 ↑ 1.0 3 1

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

21. 0.006 0.012 ↑ 1.0 3 2

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

22. 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)

23. 0.014 0.018 ↑ 1.0 1 2

Materialize (cost=0.00..1.01 rows=1 width=36) (actual time=0.009..0.009 rows=1 loops=2)

24. 0.004 0.004 ↑ 1.0 1 1

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

25. 0.018 0.018 ↓ 0.0 0 2

Index Scan using t_pline_item_id_index on t_pline p (cost=0.28..0.31 rows=1 width=13) (actual time=0.009..0.009 rows=0 loops=2)

  • Index Cond: (item_id = i.item_id)
  • Filter: (pl_id = 1)
26.          

SubPlan (for WindowAgg)

27. 0.004 0.072 ↓ 0.0 0 2

Nested Loop (cost=1.85..4.14 rows=1 width=516) (actual time=0.036..0.036 rows=0 loops=2)

  • Join Filter: (ip.prop_id = p_1.prop_id)
28. 0.029 0.068 ↓ 0.0 0 2

Hash Join (cost=1.85..3.04 rows=1 width=520) (actual time=0.034..0.034 rows=0 loops=2)

  • Hash Cond: (pv.prop_value_id = ip.prop_value_id)
29. 0.005 0.005 ↑ 13.0 1 1

Seq Scan on t_prop_value pv (cost=0.00..1.13 rows=13 width=520) (actual time=0.005..0.005 rows=1 loops=1)

30. 0.002 0.034 ↓ 0.0 0 2

Hash (cost=1.84..1.84 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
31. 0.032 0.032 ↓ 0.0 0 2

Seq Scan on t_item_prop ip (cost=0.00..1.84 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=2)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 67
32. 0.000 0.000 ↓ 0.0 0

Seq Scan on t_prop p_1 (cost=0.00..1.09 rows=1 width=4) (never executed)

  • Filter: ((brief)::text = 'GROUP'::text)
33. 0.068 0.272 ↑ 1.0 1 2

Aggregate (cost=27.16..27.17 rows=1 width=32) (actual time=0.136..0.136 rows=1 loops=2)

34. 0.032 0.204 ↑ 4.0 1 2

Hash Left Join (cost=3.50..27.14 rows=4 width=1,176) (actual time=0.099..0.102 rows=1 loops=2)

  • Hash Cond: (ip_1.prop_value_id = pv_1.prop_value_id)
35. 0.004 0.156 ↑ 4.0 1 2

Nested Loop Left Join (cost=2.21..25.83 rows=4 width=660) (actual time=0.076..0.078 rows=1 loops=2)

  • Join Filter: (ip_1.prop_id = cp.prop_id)
36. 0.052 0.118 ↑ 4.0 1 2

Hash Join (cost=2.21..23.93 rows=4 width=560) (actual time=0.056..0.059 rows=1 loops=2)

  • Hash Cond: (pt.prop_type_id = p_2.type)
37. 0.008 0.008 ↑ 141.7 6 2

Seq Scan on t_prop_type pt (cost=0.00..18.50 rows=850 width=36) (actual time=0.003..0.004 rows=6 loops=2)

38. 0.008 0.058 ↑ 1.0 1 2

Hash (cost=2.19..2.19 rows=1 width=528) (actual time=0.029..0.029 rows=1 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
39. 0.024 0.050 ↑ 1.0 1 2

Hash Join (cost=1.09..2.19 rows=1 width=528) (actual time=0.023..0.025 rows=1 loops=2)

  • Hash Cond: (p_2.prop_id = cp.prop_id)
40. 0.008 0.008 ↑ 1.0 7 2

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

41. 0.010 0.018 ↑ 1.0 1 2

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
42. 0.008 0.008 ↑ 1.0 1 2

Seq Scan on t_cat_prop cp (cost=0.00..1.07 rows=1 width=4) (actual time=0.003..0.004 rows=1 loops=2)

  • Filter: (cat_id = i.cat_id)
  • Rows Removed by Filter: 5
43. 0.006 0.034 ↓ 0.0 0 2

Materialize (cost=0.00..1.84 rows=1 width=108) (actual time=0.017..0.017 rows=0 loops=2)

44. 0.028 0.028 ↓ 0.0 0 2

Seq Scan on t_item_prop ip_1 (cost=0.00..1.84 rows=1 width=108) (actual time=0.014..0.014 rows=0 loops=2)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 67
45. 0.009 0.016 ↑ 1.0 13 1

Hash (cost=1.13..1.13 rows=13 width=520) (actual time=0.015..0.016 rows=13 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
46. 0.007 0.007 ↑ 1.0 13 1

Seq Scan on t_prop_value pv_1 (cost=0.00..1.13 rows=13 width=520) (actual time=0.004..0.007 rows=13 loops=1)

47. 0.002 0.038 ↑ 1.0 1 2

Aggregate (cost=1.53..1.54 rows=1 width=32) (actual time=0.019..0.019 rows=1 loops=2)

48. 0.036 0.036 ↓ 0.0 0 2

Seq Scan on t_item_image ii (cost=0.00..1.52 rows=1 width=1,040) (actual time=0.018..0.018 rows=0 loops=2)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 43
Planning time : 7.708 ms
Execution time : 10.869 ms