explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h9lQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.264 8,122.381 ↑ 4.0 13 1

Hash Right Join (cost=1.18..82,375,565.39 rows=52 width=609) (actual time=929.574..8,122.381 rows=13 loops=1)

  • Hash Cond: (pv.prop_id = p.prop_id)
2. 0.068 0.068 ↑ 1.3 542 1

Seq Scan on t_prop_value pv (cost=0.00..15.80 rows=680 width=65) (actual time=0.005..0.068 rows=542 loops=1)

3. 0.003 0.013 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
4. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on t_prop p (cost=0.00..1.16 rows=1 width=4) (actual time=0.010..0.010 rows=1 loops=1)

  • Filter: ((brief)::text = 'theme'::text)
  • Rows Removed by Filter: 13
5.          

SubPlan (forHash Right Join)

6. 0.073 0.364 ↑ 1.0 1 13

Nested Loop (cost=1.65..17.69 rows=1 width=13) (actual time=0.025..0.028 rows=1 loops=13)

7.          

Initplan (forNested Loop)

8. 0.005 0.005 ↑ 1.0 1 1

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

  • Filter: ((brief)::text = 'THEME'::text)
  • Rows Removed by Filter: 7
9. 0.221 0.221 ↑ 1.0 1 13

Index Scan using t_image_link_object_id_idx on t_image_link til (cost=0.28..8.30 rows=1 width=8) (actual time=0.015..0.017 rows=1 loops=13)

  • Index Cond: (pv.prop_value_id = object_id)
  • Filter: (object_type_id = $0)
  • Rows Removed by Filter: 1
10. 0.065 0.065 ↑ 1.0 1 13

Index Scan using t_image_pkey on t_image i (cost=0.28..8.30 rows=1 width=21) (actual time=0.005..0.005 rows=1 loops=13)

  • Index Cond: (image_id = til.image_id)
11. 2.190 8,121.672 ↑ 1.0 1 13

Aggregate (cost=1,584,127.41..1,584,127.42 rows=1 width=32) (actual time=624.744..624.744 rows=1 loops=13)

12. 1.164 4.914 ↓ 9.0 18 13

Nested Loop (cost=41.83..58.16 rows=2 width=13) (actual time=0.061..0.378 rows=18 loops=13)

13. 0.325 1.209 ↓ 9.0 18 13

Unique (cost=41.55..41.56 rows=2 width=8) (actual time=0.050..0.093 rows=18 loops=13)

14. 0.507 0.884 ↓ 9.0 18 13

Sort (cost=41.55..41.55 rows=2 width=8) (actual time=0.048..0.068 rows=18 loops=13)

  • Sort Key: opv.object_id
  • Sort Method: quicksort Memory: 25kB
15. 0.221 0.377 ↓ 9.0 18 13

Bitmap Heap Scan on t_object_propval opv (cost=4.55..41.54 rows=2 width=8) (actual time=0.022..0.029 rows=18 loops=13)

  • Recheck Cond: (prop_value_id = pv.prop_value_id)
  • Filter: ((object_type_id = 9) AND (prop_id = 41))
  • Heap Blocks: exact=46
16. 0.156 0.156 ↓ 1.0 36 13

Bitmap Index Scan on t_object_propval_prop_value_id_idx (cost=0.00..4.54 rows=35 width=0) (actual time=0.012..0.012 rows=36 loops=13)

  • Index Cond: (prop_value_id = pv.prop_value_id)
17. 2.541 2.541 ↑ 1.0 1 231

Index Scan using t_cat_pkey on t_cat c (cost=0.28..8.30 rows=1 width=13) (actual time=0.011..0.011 rows=1 loops=231)

  • Index Cond: (cat_id = opv.object_id)
18.          

SubPlan (forAggregate)

19. 15.926 8,114.568 ↑ 1.0 1 231

Aggregate (cost=792,034.61..792,034.62 rows=1 width=32) (actual time=35.128..35.128 rows=1 loops=231)

20. 1.617 3.234 ↑ 113.5 2 231

Bitmap Heap Scan on t_item i_1 (cost=6.18..779.04 rows=227 width=129) (actual time=0.011..0.014 rows=2 loops=231)

  • Recheck Cond: (cat_id = c.cat_id)
  • Heap Blocks: exact=243
21. 1.617 1.617 ↑ 113.5 2 231

Bitmap Index Scan on t_item_cat_id_idx (cost=0.00..6.12 rows=227 width=0) (actual time=0.007..0.007 rows=2 loops=231)

  • Index Cond: (cat_id = c.cat_id)
22.          

SubPlan (forAggregate)

23. 0.464 4.176 ↓ 0.0 0 464

Nested Loop (cost=0.56..17.70 rows=1 width=13) (actual time=0.009..0.009 rows=0 loops=464)

  • Join Filter: (il.object_type_id = ot_1.object_type_id)
24. 0.928 3.712 ↓ 0.0 0 464

Nested Loop (cost=0.56..16.60 rows=1 width=21) (actual time=0.008..0.008 rows=0 loops=464)

25. 2.784 2.784 ↓ 0.0 0 464

Index Scan using t_image_link_object_id_idx on t_image_link il (cost=0.28..8.30 rows=1 width=16) (actual time=0.006..0.006 rows=0 loops=464)

  • Index Cond: (object_id = i_1.item_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using t_image_pkey on t_image i1 (cost=0.28..8.30 rows=1 width=21) (never executed)

  • Index Cond: (image_id = il.image_id)
27. 0.000 0.000 ↓ 0.0 0

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

  • Filter: ((brief)::text = 'SCHEMA'::text)
28. 3.248 3.248 ↑ 3.0 1 464

Index Scan using t_pline_item_id_index on t_pline pl (cost=0.42..16.27 rows=3 width=5) (actual time=0.006..0.007 rows=1 loops=464)

  • Index Cond: (item_id = i_1.item_id)
29. 8,087.984 8,087.984 ↑ 1.0 1 464

Seq Scan on t_icode ic (cost=0.00..3,451.74 rows=1 width=13) (actual time=17.182..17.431 rows=1 loops=464)

  • Filter: (item_id = i_1.item_id)
  • Rows Removed by Filter: 165846
Planning time : 1.016 ms
Execution time : 8,122.508 ms