explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5nj3

Settings
# exclusive inclusive rows x rows loops node
1. 0.241 8,278.706 ↑ 4.0 13 1

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

  • Hash Cond: (pv.prop_id = p.prop_id)
2. 0.075 0.075 ↑ 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.075 rows=542 loops=1)

3. 0.003 0.016 ↑ 1.0 1 1

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

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

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

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

SubPlan (forHash Right Join)

6. 0.057 0.377 ↑ 1.0 1 13

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

7.          

Initplan (forNested Loop)

8. 0.008 0.008 ↑ 1.0 1 1

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

  • Filter: ((brief)::text = 'THEME'::text)
  • Rows Removed by Filter: 7
9. 0.208 0.208 ↑ 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.014..0.016 rows=1 loops=13)

  • Index Cond: (pv.prop_value_id = object_id)
  • Filter: (object_type_id = $0)
  • Rows Removed by Filter: 1
10. 0.104 0.104 ↑ 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.008..0.008 rows=1 loops=13)

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

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

12. 1.193 5.122 ↓ 9.0 18 13

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

13. 0.364 1.157 ↓ 9.0 18 13

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

14. 0.494 0.793 ↓ 9.0 18 13

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

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

Bitmap Heap Scan on t_object_propval opv (cost=4.55..41.54 rows=2 width=8) (actual time=0.018..0.023 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.117 0.117 ↓ 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.009..0.009 rows=36 loops=13)

  • Index Cond: (prop_value_id = pv.prop_value_id)
17. 2.772 2.772 ↑ 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.012..0.012 rows=1 loops=231)

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

SubPlan (forAggregate)

19. 16.875 8,270.493 ↑ 1.0 1 231

Aggregate (cost=792,034.61..792,034.62 rows=1 width=32) (actual time=35.803..35.803 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.640 ↓ 0.0 0 464

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

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

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

25. 3.248 3.248 ↓ 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.007..0.007 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.007..0.007 rows=1 loops=464)

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

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

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