explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hSPk

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 0.176 ↓ 8.0 8 1

Nested Loop (cost=6.14..24.90 rows=1 width=907) (actual time=0.134..0.176 rows=8 loops=1)

2. 0.004 0.146 ↓ 2.0 2 1

Nested Loop (cost=1.93..10.50 rows=1 width=875) (actual time=0.121..0.146 rows=2 loops=1)

3. 0.027 0.122 ↑ 1.0 5 1

Nested Loop (cost=1.79..9.39 rows=5 width=4) (actual time=0.044..0.122 rows=5 loops=1)

4. 0.021 0.065 ↓ 6.0 6 1

Nested Loop (cost=0.00..2.17 rows=1 width=8) (actual time=0.026..0.065 rows=6 loops=1)

  • Join Filter: (advertisers.id = advertisers_1.id)
  • Rows Removed by Join Filter: 30
5. 0.020 0.020 ↓ 6.0 6 1

Seq Scan on advertisers advertisers_1 (cost=0.00..1.06 rows=1 width=4) (actual time=0.017..0.020 rows=6 loops=1)

  • Filter: (platform_client_id = 1)
6. 0.024 0.024 ↓ 1.2 6 6

Seq Scan on advertisers (cost=0.00..1.05 rows=5 width=4) (actual time=0.003..0.004 rows=6 loops=6)

7. 0.012 0.030 ↑ 5.0 1 6

Bitmap Heap Scan on brands (cost=1.79..7.17 rows=5 width=8) (actual time=0.005..0.005 rows=1 loops=6)

  • Recheck Cond: (advertiser_id = advertisers.id)
  • Heap Blocks: exact=5
8. 0.018 0.018 ↑ 5.0 1 6

Bitmap Index Scan on index_brands_on_advertiser_id (cost=0.00..1.79 rows=5 width=0) (actual time=0.003..0.003 rows=1 loops=6)

  • Index Cond: (advertiser_id = advertisers.id)
9. 0.020 0.020 ↓ 0.0 0 5

Index Scan using index_campaigns_on_brand_id on campaigns (cost=0.14..0.21 rows=1 width=875) (actual time=0.003..0.004 rows=0 loops=5)

  • Index Cond: (brand_id = brands.id)
  • Filter: (status = 3)
  • Rows Removed by Filter: 0
10. 0.012 0.018 ↓ 4.0 4 2

Bitmap Heap Scan on campaigns_placements (cost=4.21..14.39 rows=1 width=32) (actual time=0.008..0.009 rows=4 loops=2)

  • Recheck Cond: (campaign_id = campaigns.id)
  • Filter: (placement_id = ANY ('{1,4,3,2}'::integer[]))
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=2
11. 0.006 0.006 ↑ 1.2 6 2

Bitmap Index Scan on index_campaigns_placements_on_campaign_id (cost=0.00..4.21 rows=7 width=0) (actual time=0.003..0.003 rows=6 loops=2)

  • Index Cond: (campaign_id = campaigns.id)