explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mh0

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

Limit (cost=232,256.17..232,274.29 rows=3 width=860) (actual time=0.035..0.035 rows=0 loops=1)

2. 0.000 0.035 ↓ 0.0 0 1

Nested Loop Left Join (cost=232,256.17..232,274.29 rows=3 width=860) (actual time=0.035..0.035 rows=0 loops=1)

  • Join Filter: (cvc.date = conso.date1)
3. 0.001 0.035 ↓ 0.0 0 1

Merge Left Join (cost=225,726.68..225,727.07 rows=1 width=276) (actual time=0.035..0.035 rows=0 loops=1)

  • Merge Cond: (conso.date1 = rtb.date)
4. 0.009 0.034 ↓ 0.0 0 1

Sort (cost=47.46..47.46 rows=1 width=252) (actual time=0.034..0.034 rows=0 loops=1)

  • Sort Key: conso.date1 DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.001 0.025 ↓ 0.0 0 1

Subquery Scan on conso (cost=2.41..47.45 rows=1 width=252) (actual time=0.025..0.025 rows=0 loops=1)

6. 0.001 0.024 ↓ 0.0 0 1

GroupAggregate (cost=2.41..47.44 rows=1 width=252) (actual time=0.024..0.024 rows=0 loops=1)

  • Group Key: cc.date
7. 0.001 0.023 ↓ 0.0 0 1

Nested Loop Semi Join (cost=2.41..47.35 rows=1 width=77) (actual time=0.023..0.023 rows=0 loops=1)

8. 0.000 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.13..43.77 rows=1 width=80) (actual time=0.022..0.022 rows=0 loops=1)

9. 0.000 0.022 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.84..40.20 rows=1 width=84) (actual time=0.022..0.022 rows=0 loops=1)

10. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=1.42..31.74 rows=1 width=78) (actual time=0.022..0.022 rows=0 loops=1)

11. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=1.15..25.22 rows=1 width=79) (actual time=0.022..0.022 rows=0 loops=1)

12. 0.000 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.86..16.91 rows=1 width=75) (actual time=0.022..0.022 rows=0 loops=1)

13. 0.022 0.022 ↓ 0.0 0 1

Index Scan using conso_commission_global_uix on conso_commission cc (cost=0.57..8.59 rows=1 width=75) (actual time=0.022..0.022 rows=0 loops=1)

  • Index Cond: ((date >= '2019-03-07'::date) AND (date <= '2019-03-13'::date))
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using campaign_pkey on campaign cam (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Index Cond: (id = cc.campaign_id)
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Index Scan using zone_pkey on zone z (cost=0.29..8.30 rows=1 width=12) (never executed)

  • Index Cond: (id = cc.zone_id)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using website_pkey on media m (cost=0.28..6.51 rows=1 width=7) (never executed)

  • Index Cond: (id = z.media_id)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using conversion_rate_history_pkey on conversion_rate_history crh (cost=0.42..8.45 rows=1 width=10) (never executed)

  • Index Cond: ((cc.date = date) AND (date >= '2019-03-07'::date) AND (date <= '2019-03-13'::date) AND (iso = 'EUR'::bpchar))
18. 0.000 0.000 ↓ 0.0 0

Index Only Scan using campaign_flag_pkey on campaign_flag cf (cost=0.29..3.57 rows=1 width=4) (never executed)

  • Index Cond: (campaign_id = cam.id)
  • Heap Fetches: 0
19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using flex_user_countries_pk on flex_user_countries fuco (cost=0.29..3.56 rows=1 width=3) (never executed)

  • Index Cond: ((flex_user_id = '3493'::bigint) AND (country_ref = (m.country_ref)::text))
  • Heap Fetches: 0
20. 0.000 0.000 ↓ 0.0 0

Sort (cost=225,679.22..225,679.41 rows=75 width=28) (never executed)

  • Sort Key: rtb.date DESC
21. 0.000 0.000 ↓ 0.0 0

Subquery Scan on rtb (cost=225,675.39..225,676.89 rows=75 width=28) (never executed)

22. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=225,675.39..225,676.14 rows=75 width=28) (never executed)

  • Group Key: wrc.date
23. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=55,093.98..219,153.84 rows=652,155 width=16) (never executed)

  • Hash Cond: (wrc.campaign_id = cam_1.id)
24. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=53,889.37..208,982.10 rows=652,155 width=20) (never executed)

  • Hash Cond: (wrc.zone_id = z_1.id)
25. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on rtb_zone_winrate_campaign wrc (cost=52,028.34..196,137.82 rows=1,189,832 width=24) (never executed)

  • Recheck Cond: ((date >= '2019-01-07'::date) AND (date <= '2019-01-13'::date))
26. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on rtb_zone_winrate_campaign_global_uix (cost=0.00..51,730.88 rows=1,189,832 width=0) (never executed)

  • Index Cond: ((date >= '2019-01-07'::date) AND (date <= '2019-01-13'::date))
27. 0.000 0.000 ↓ 0.0 0

Hash (cost=1,671.21..1,671.21 rows=15,186 width=4) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=87.35..1,671.21 rows=15,186 width=4) (never executed)

  • Hash Cond: (z_1.media_id = m_1.id)
29. 0.000 0.000 ↓ 0.0 0

Seq Scan on zone z_1 (cost=0.00..1,328.07 rows=27,707 width=8) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Hash (cost=76.26..76.26 rows=887 width=4) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=4.38..76.26 rows=887 width=4) (never executed)

  • Hash Cond: ((m_1.country_ref)::text = (fuco_1.country_ref)::text)
32. 0.000 0.000 ↓ 0.0 0

Seq Scan on media m_1 (cost=0.00..62.18 rows=1,618 width=7) (never executed)

33. 0.000 0.000 ↓ 0.0 0

Hash (cost=4.34..4.34 rows=3 width=3) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Index Only Scan using flex_user_countries_pk on flex_user_countries fuco_1 (cost=0.29..4.34 rows=3 width=3) (never executed)

  • Index Cond: (flex_user_id = '3493'::bigint)
  • Heap Fetches: 0
35. 0.000 0.000 ↓ 0.0 0

Hash (cost=981.49..981.49 rows=17,849 width=4) (never executed)

36. 0.000 0.000 ↓ 0.0 0

Seq Scan on campaign cam_1 (cost=0.00..981.49 rows=17,849 width=4) (never executed)

37. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=6,529.49..6,534.76 rows=527 width=12) (never executed)

  • Group Key: cvc.date
38. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1,936.44..6,490.75 rows=7,748 width=8) (never executed)

  • Hash Cond: (cvc.campaign_id = cam_2.id)
39. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on conso_vu_campaign cvc (cost=731.84..5,179.61 rows=7,748 width=12) (never executed)

  • Recheck Cond: ((date >= '2019-01-07'::date) AND (date <= '2019-01-13'::date))
40. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on conso_vu_campaign_uix (cost=0.00..729.90 rows=7,748 width=0) (never executed)

  • Index Cond: ((date >= '2019-01-07'::date) AND (date <= '2019-01-13'::date))
41. 0.000 0.000 ↓ 0.0 0

Hash (cost=981.49..981.49 rows=17,849 width=4) (never executed)

42. 0.000 0.000 ↓ 0.0 0

Seq Scan on campaign cam_2 (cost=0.00..981.49 rows=17,849 width=4) (never executed)