explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jBeU

Settings
# exclusive inclusive rows x rows loops node
1. 0.174 0.742 ↓ 2.0 2 1

Nested Loop Semi Join (cost=23.06..31.17 rows=1 width=4) (actual time=0.232..0.742 rows=2 loops=1)

2. 0.134 0.392 ↓ 4.0 4 1

Nested Loop (cost=22.91..30.94 rows=1 width=8) (actual time=0.189..0.392 rows=4 loops=1)

3. 0.084 0.198 ↓ 4.0 4 1

HashAggregate (cost=22.75..22.76 rows=1 width=4) (actual time=0.141..0.198 rows=4 loops=1)

  • Group Key: product_tags.product_id
4. 0.114 0.114 ↓ 4.0 4 1

Seq Scan on product_tags (cost=0.00..22.75 rows=1 width=4) (actual time=0.026..0.114 rows=4 loops=1)

  • Filter: ((tag_value = ANY ('{s,m}'::text[])) AND (tag_key = 'size'::text))
  • Rows Removed by Filter: 8
5. 0.060 0.060 ↑ 1.0 1 4

Index Only Scan using products_pkey on products (cost=0.15..8.17 rows=1 width=4) (actual time=0.012..0.015 rows=1 loops=4)

  • Index Cond: (id = product_tags.product_id)
  • Heap Fetches: 4
6. 0.176 0.176 ↓ 0.0 0 4

Index Only Scan using product_tags_pkey on product_tags product_tags_1 (cost=0.15..0.19 rows=1 width=4) (actual time=0.041..0.044 rows=0 loops=4)

  • Index Cond: ((product_id = products.id) AND (tag_key = 'color'::text))
  • Filter: (tag_value = ANY ('{blue,black}'::text[]))
  • Rows Removed by Filter: 0
  • Heap Fetches: 4
Planning time : 0.277 ms
Execution time : 1.962 ms