explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fqKa

Settings
# exclusive inclusive rows x rows loops node
1. 24.601 53.209 ↓ 3.6 1,304 1

Sort (cost=488.73..489.63 rows=359 width=1,564) (actual time=52.864..53.209 rows=1,304 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, product_1.id, product_1.site_id, product_1.code, product_1.name, product_1.availability, product_1.denomination_type, product_1.available_denominations, product_1.percent_discount, product_1.minimum_value, product_1.maximum_value, product_1.currency, product_1.description, product_1.tc_markdown, product_1.redeem_markdown, product_1.card_image_url
  • Sort Key: tag.name
  • Sort Method: quicksort Memory: 2,494kB
  • Buffers: shared hit=309
2. 1.015 28.608 ↓ 3.6 1,304 1

Hash Right Join (cost=373.30..473.49 rows=359 width=1,564) (actual time=15.603..28.608 rows=1,304 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name, product_1.id, product_1.site_id, product_1.code, product_1.name, product_1.availability, product_1.denomination_type, product_1.available_denominations, product_1.percent_discount, product_1.minimum_value, product_1.maximum_value, product_1.currency, product_1.description, product_1.tc_markdown, product_1.redeem_markdown, product_1.card_image_url
  • Hash Cond: (product_tag_1.tag_id = tag.id)
  • Buffers: shared hit=309
3. 11.396 27.137 ↑ 1.0 4,432 1

Hash Join (cost=292.02..372.00 rows=4,432 width=1,468) (actual time=15.138..27.137 rows=4,432 loops=1)

  • Output: product_tag_1.tag_id, product_1.id, product_1.site_id, product_1.code, product_1.name, product_1.availability, product_1.denomination_type, product_1.available_denominations, product_1.percent_discount, product_1.minimum_value, product_1.maximum_value, product_1.currency, product_1.description, product_1.tc_markdown, product_1.redeem_markdown, product_1.card_image_url
  • Inner Unique: true
  • Hash Cond: (product_tag_1.product_id = product_1.id)
  • Buffers: shared hit=284
4. 0.620 0.620 ↑ 1.0 4,432 1

Seq Scan on public.product_tag product_tag_1 (cost=0.00..68.32 rows=4,432 width=16) (actual time=0.005..0.620 rows=4,432 loops=1)

  • Output: product_tag_1.product_id, product_tag_1.tag_id
  • Buffers: shared hit=24
5. 2.631 15.121 ↑ 1.0 1,423 1

Hash (cost=274.23..274.23 rows=1,423 width=1,460) (actual time=15.121..15.121 rows=1,423 loops=1)

  • Output: product_1.id, product_1.site_id, product_1.code, product_1.name, product_1.availability, product_1.denomination_type, product_1.available_denominations, product_1.percent_discount, product_1.minimum_value, product_1.maximum_value, product_1.currency, product_1.description, product_1.tc_markdown, product_1.redeem_markdown, product_1.card_image_url
  • Buckets: 2,048 Batches: 1 Memory Usage: 1,983kB
  • Buffers: shared hit=260
6. 12.490 12.490 ↑ 1.0 1,423 1

Seq Scan on public.product product_1 (cost=0.00..274.23 rows=1,423 width=1,460) (actual time=0.004..12.490 rows=1,423 loops=1)

  • Output: product_1.id, product_1.site_id, product_1.code, product_1.name, product_1.availability, product_1.denomination_type, product_1.available_denominations, product_1.percent_discount, product_1.minimum_value, product_1.maximum_value, product_1.currency, product_1.description, product_1.tc_markdown, product_1.redeem_markdown, product_1.card_image_url
  • Buffers: shared hit=260
7. 0.007 0.456 ↑ 1.5 2 1

Hash (cost=81.24..81.24 rows=3 width=104) (actual time=0.456..0.456 rows=2 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=25
8. 0.007 0.449 ↑ 1.5 2 1

Hash Join (cost=1.83..81.24 rows=3 width=104) (actual time=0.200..0.449 rows=2 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Inner Unique: true
  • Hash Cond: (product_tag.tag_id = tag.id)
  • Buffers: shared hit=25
9. 0.426 0.426 ↑ 1.5 2 1

Seq Scan on public.product_tag (cost=0.00..79.40 rows=3 width=8) (actual time=0.177..0.426 rows=2 loops=1)

  • Output: product_tag.product_id, product_tag.tag_id
  • Filter: (593 = product_tag.product_id)
  • Rows Removed by Filter: 4,430
  • Buffers: shared hit=24
10. 0.009 0.016 ↑ 1.0 37 1

Hash (cost=1.37..1.37 rows=37 width=104) (actual time=0.016..0.016 rows=37 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=1
11. 0.007 0.007 ↑ 1.0 37 1

Seq Scan on public.tag (cost=0.00..1.37 rows=37 width=104) (actual time=0.003..0.007 rows=37 loops=1)

  • Output: tag.id, tag.tag_type, tag.code, tag.name
  • Buffers: shared hit=1