explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZwZdK

Settings
# exclusive inclusive rows x rows loops node
1. 6.302 4,105.012 ↑ 1.0 1 1

Aggregate (cost=485,747.58..485,747.59 rows=1 width=32) (actual time=4,105.012..4,105.012 rows=1 loops=1)

2. 0.735 4,098.710 ↑ 1.0 200 1

Subquery Scan on tt (cost=0.29..485,747.08 rows=200 width=450) (actual time=27.153..4,098.710 rows=200 loops=1)

3. 0.162 4,097.975 ↑ 1.0 200 1

Limit (cost=0.29..485,745.08 rows=200 width=498) (actual time=27.135..4,097.975 rows=200 loops=1)

4. 3.477 4,097.813 ↑ 3.8 200 1

WindowAgg (cost=0.29..1,831,258.15 rows=754 width=498) (actual time=27.133..4,097.813 rows=200 loops=1)

5. 0.383 4.936 ↓ 1.0 774 1

Nested Loop (cost=0.29..3,857.67 rows=754 width=422) (actual time=0.839..4.936 rows=774 loops=1)

6. 3.005 3.005 ↓ 1.0 774 1

Seq Scan on t_item_link ti (cost=0.00..735.70 rows=754 width=12) (actual time=0.825..3.005 rows=774 loops=1)

  • Filter: (object_id = 30947)
  • Rows Removed by Filter: 36242
7. 1.548 1.548 ↑ 1.0 1 774

Index Scan using t_item_pkey on t_item i (cost=0.29..4.14 rows=1 width=418) (actual time=0.002..0.002 rows=1 loops=774)

  • Index Cond: (item_id = ti.item_id)
8.          

SubPlan (forWindowAgg)

9. 10.000 2,933.200 ↑ 1.0 1 200

Aggregate (cost=1,116.64..1,116.65 rows=1 width=32) (actual time=14.666..14.666 rows=1 loops=200)

10. 3.200 2,923.200 ↓ 1.5 3 200

Nested Loop (cost=0.28..1,100.01 rows=2 width=698) (actual time=1.425..14.616 rows=3 loops=200)

  • Join Filter: (p.type = pt.prop_type_id)
  • Rows Removed by Join Filter: 15
11. 2.400 2,918.800 ↓ 3.0 3 200

Nested Loop Left Join (cost=0.28..1,070.88 rows=1 width=666) (actual time=1.418..14.594 rows=3 loops=200)

12. 2.000 2,911.000 ↓ 3.0 3 200

Nested Loop Left Join (cost=0.00..1,062.58 rows=1 width=628) (actual time=1.406..14.555 rows=3 loops=200)

  • Join Filter: (ip.prop_id = cp.prop_id)
  • Rows Removed by Join Filter: 6
13. 5.200 6.800 ↓ 3.0 3 200

Nested Loop (cost=0.00..2.14 rows=1 width=528) (actual time=0.013..0.034 rows=3 loops=200)

  • Join Filter: (p.prop_id = cp.prop_id)
  • Rows Removed by Join Filter: 3
14. 1.000 1.000 ↓ 3.0 3 200

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

  • Filter: (cat_id = i.cat_id)
  • Rows Removed by Filter: 3
15. 0.600 0.600 ↑ 1.5 2 600

Seq Scan on t_prop p (cost=0.00..1.03 rows=3 width=524) (actual time=0.001..0.001 rows=2 loops=600)

16. 2,902.200 2,902.200 ↓ 1.5 3 600

Seq Scan on t_item_prop ip (cost=0.00..1,060.41 rows=2 width=108) (actual time=0.501..4.837 rows=3 loops=600)

  • Filter: (item_id = i.item_id)
  • Rows Removed by Filter: 53390
17. 5.400 5.400 ↑ 1.0 1 600

Index Scan using t_prop_value_pkey on t_prop_value pv (cost=0.28..8.30 rows=1 width=42) (actual time=0.009..0.009 rows=1 loops=600)

  • Index Cond: (prop_value_id = ip.prop_value_id)
18. 1.200 1.200 ↑ 141.7 6 600

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=600)

19.          

SubPlan (forAggregate)

20. 0.000 0.000 ↓ 0.0 0

Index Scan using t_item_pkey on t_item ti1 (cost=0.29..8.30 rows=1 width=66) (never executed)

  • Index Cond: (item_id = ip.object_id)
21. 12.200 1,156.200 ↑ 1.0 1 200

Aggregate (cost=1,306.94..1,306.95 rows=1 width=32) (actual time=5.781..5.781 rows=1 loops=200)

22. 3.328 1,144.000 ↓ 6.0 6 200

Nested Loop (cost=0.29..1,306.93 rows=1 width=111) (actual time=0.459..5.720 rows=6 loops=200)

23. 1.000 1,133.400 ↓ 6.0 6 200

Nested Loop (cost=0.00..1,298.63 rows=1 width=24) (actual time=0.440..5.667 rows=6 loops=200)

  • Join Filter: (fl.object_type_id = ot.object_type_id)
24. 1.000 1.000 ↑ 1.0 1 200

Seq Scan on t_object_type ot (cost=0.00..1.11 rows=1 width=4) (actual time=0.003..0.005 rows=1 loops=200)

  • Filter: ((brief)::text = 'ITEM'::text)
  • Rows Removed by Filter: 8
25. 1,131.400 1,131.400 ↑ 1.2 6 200

Seq Scan on t_file_link fl (cost=0.00..1,297.43 rows=7 width=24) (actual time=0.435..5.657 rows=6 loops=200)

  • Filter: (object_id = i.item_id)
  • Rows Removed by Filter: 65308
26. 7.272 7.272 ↑ 1.0 1 1,212

Index Scan using t_file_pkey on t_file f (cost=0.29..8.31 rows=1 width=91) (actual time=0.006..0.006 rows=1 loops=1,212)

  • Index Cond: (file_id = fl.file_id)
  • Filter: (NOT deleted)
Planning time : 1.242 ms
Execution time : 4,105.169 ms