explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UQqu : offer_clicks query PGhero

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 0.230 ↓ 0.0 0 1

Limit (cost=117.78..117.79 rows=1 width=1,193) (actual time=0.229..0.230 rows=0 loops=1)

2. 0.012 0.229 ↓ 0.0 0 1

Sort (cost=117.78..117.79 rows=1 width=1,193) (actual time=0.229..0.229 rows=0 loops=1)

  • Sort Key: offer_clicks.created_at DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.024 0.217 ↓ 0.0 0 1

Hash Semi Join (cost=36.70..117.77 rows=1 width=1,193) (actual time=0.217..0.217 rows=0 loops=1)

  • Hash Cond: (offer_clicks.offer_id = offers.id)
4. 0.052 0.052 ↑ 2.7 23 1

Index Scan using index_offer_clicks_on_device_id_partial_status on offer_clicks (cost=0.44..81.35 rows=63 width=1,193) (actual time=0.013..0.052 rows=23 loops=1)

  • Index Cond: (device_id = 7,693,492)
5. 0.019 0.141 ↓ 5.6 45 1

Hash (cost=36.16..36.16 rows=8 width=4) (actual time=0.141..0.141 rows=45 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
6. 0.089 0.122 ↓ 5.6 45 1

Bitmap Heap Scan on offers (cost=4.48..36.16 rows=8 width=4) (actual time=0.042..0.122 rows=45 loops=1)

  • Recheck Cond: ((bundle_id)::text = 'com.azino.online'::text)
  • Heap Blocks: exact=43
7. 0.033 0.033 ↓ 6.9 55 1

Bitmap Index Scan on index_offers_on_bundle_id (cost=0.00..4.47 rows=8 width=0) (actual time=0.033..0.033 rows=55 loops=1)

  • Index Cond: ((bundle_id)::text = 'com.azino.online'::text)
Planning time : 0.422 ms
Execution time : 0.280 ms