explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ajQE : Optimization for: plan #FiPB

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 26.919 490.694 ↑ 1.8 10,961 1

Nested Loop Left Join (cost=12,065.05..265,241.97 rows=19,828 width=1,194) (actual time=154.822..490.694 rows=10,961 loops=1)

2. 0.151 398.009 ↑ 1.8 10,961 1

Nested Loop Left Join (cost=12,064.50..221,471.47 rows=19,813 width=1,114) (actual time=154.788..398.009 rows=10,961 loops=1)

3. 3.155 332.092 ↑ 1.8 10,961 1

Nested Loop (cost=12,063.94..181,569.73 rows=19,798 width=1,105) (actual time=154.778..332.092 rows=10,961 loops=1)

4. 116.615 259.403 ↑ 2.1 11,589 1

Bitmap Heap Scan on ads a (cost=12,063.39..132,267.05 rows=23,941 width=1,105) (actual time=154.760..259.403 rows=11,589 loops=1)

  • Recheck Cond: (country_code = 'AE'::text)
  • Filter: (active AND (make_id = 86) AND ('AE_dubicars'::text <> (source ->> 'scrape_site'::text)))
  • Rows Removed by Filter: 83,117
  • Heap Blocks: exact=77,406
5. 10.429 142.788 ↓ 0.0 0 1

BitmapAnd (cost=12,063.39..12,063.39 rows=127,322 width=0) (actual time=142.788..142.788 rows=0 loops=1)

6. 82.048 82.048 ↑ 1.0 547,919 1

Bitmap Index Scan on idx_app_ads_active (cost=0.00..5,778.78 rows=549,273 width=0) (actual time=82.048..82.048 rows=547,919 loops=1)

  • Index Cond: (active = true)
7. 50.311 50.311 ↑ 1.0 588,778 1

Bitmap Index Scan on idx_app_ads_country_code (cost=0.00..6,272.39 rows=596,168 width=0) (actual time=50.311..50.311 rows=588,778 loops=1)

  • Index Cond: (country_code = 'AE'::text)
8. 69.534 69.534 ↑ 1.0 1 11,589

Index Scan using idx_ranked_ads_ad_id on ranked_ads r (cost=0.56..2.06 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=11,589)

  • Index Cond: (ad_id = a.id)
  • Filter: (rank = 1)
  • Rows Removed by Filter: 0
9. 65.766 65.766 ↑ 1.0 1 10,961

Index Scan using hot_deal_ad_info_pkey on hot_deal_ad_info h (cost=0.56..2.02 rows=1 width=42) (actual time=0.006..0.006 rows=1 loops=10,961)

  • Index Cond: (ad_id = a.id)
10. 65.766 65.766 ↑ 1.0 1 10,961

Index Scan using cesar_ad_info_pkey on cesar_ad_info c (cost=0.56..1.95 rows=1 width=49) (actual time=0.006..0.006 rows=1 loops=10,961)

  • Index Cond: (ad_id = a.id)
Planning time : 1.372 ms
Execution time : 497.251 ms