explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KzA

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

Sort (cost=1,177,897.19..1,179,126.79 rows=491,837 width=911) (actual rows= loops=)

  • Sort Key: ads.post_date DESC
2. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=1,142,676.92..1,162,350.40 rows=491,837 width=911) (actual rows= loops=)

  • Group Key: ads.post_id, ai.publish_time
3. 0.000 0.000 ↓ 0.0

Sort (cost=1,142,676.92..1,143,906.51 rows=491,837 width=799) (actual rows= loops=)

  • Sort Key: ads.post_id, ai.publish_time
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=65,056.27..749,875.09 rows=491,837 width=799) (actual rows= loops=)

  • Hash Cond: ((ads.post_id)::text = (adf.post_id)::text)
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=65,046.93..747,406.54 rows=491,837 width=783) (actual rows= loops=)

  • Hash Cond: ((ads.post_id)::text = (ai.post_id)::text)
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=65,042.19..745,555.34 rows=491,837 width=775) (actual rows= loops=)

  • Hash Cond: ((adst.post_id)::text = (ads.post_id)::text)
  • Join Filter: ((adst.statistical_time <= ads.statistical_time) AND (adst.statistical_time >= (ads.statistical_time - '6 days'::interval)))
7. 0.000 0.000 ↓ 0.0

Seq Scan on wp_pidi_fb_ads_tracking adst (cost=0.00..481,311.33 rows=4,426,533 width=48) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Hash (cost=34,072.75..34,072.75 rows=291,475 width=743) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Seq Scan on wp_pidi_fb_ads ads (cost=0.00..34,072.75 rows=291,475 width=743) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Hash (cost=3.22..3.22 rows=122 width=24) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on wp_pidi_ai_picked_ads ai (cost=0.00..3.22 rows=122 width=24) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash (cost=9.32..9.32 rows=2 width=16) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on wp_pidi_fb_ads_favorite adf (cost=4.29..9.32 rows=2 width=16) (actual rows= loops=)

  • Recheck Cond: (user_id = 43)
14. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on wp_pidi_fb_ads_favorite_pkey (cost=0.00..4.29 rows=2 width=0) (actual rows= loops=)

  • Index Cond: (user_id = 43)