explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YgPP

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Hash Join (cost=13,586.54..28,618.20 rows=10 width=1,492) (actual rows= loops=)

  • Hash Cond: ((pma.ad_id)::text = (ad_max_versions.max_version_id)::text)
  • Join Filter: (pma.ad_version < ad_max_versions.potato) CTE ad_max_versions
2. 0.000 0.000 ↓ 0.0

HashAggregate (cost=13,343.03..13,380.76 rows=3,773 width=13) (actual rows= loops=)

  • Group Key: post_moderation_ads.ad_id
3. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on post_moderation_ads (cost=83.16..13,324.13 rows=3,779 width=13) (actual rows= loops=)

  • Recheck Cond: (((ad_id)::integer > 100000427) AND ((ad_id)::integer < 200000427))
4. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ad_id_int_index (cost=0.00..82.21 rows=3,779 width=0) (actual rows= loops=)

  • Index Cond: (((ad_id)::integer > 100000427) AND ((ad_id)::integer < 200000427))
5. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on post_moderation_ads pma (cost=83.16..13,324.13 rows=3,779 width=1,350) (actual rows= loops=)

  • Recheck Cond: (((ad_id)::integer > 100000427) AND ((ad_id)::integer < 200000427))
6. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on ad_id_int_index (cost=0.00..82.21 rows=3,779 width=0) (actual rows= loops=)

  • Index Cond: (((ad_id)::integer > 100000427) AND ((ad_id)::integer < 200000427))
7. 0.000 0.000 ↓ 0.0

Hash (cost=75.46..75.46 rows=3,773 width=142) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

CTE Scan on ad_max_versions (cost=0.00..75.46 rows=3,773 width=142) (actual rows= loops=)