explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nuuo

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 10,109.979 ↑ 1,252.0 7 1

GroupAggregate (cost=2,438,423.14..2,439,768.28 rows=8,764 width=64) (actual time=10,094.309..10,109.979 rows=7 loops=1)

  • Group Key: stats_subpublisher_general_old.date, core_campaign.app_id, core_app.name, core_app.platform
  • Buffers: shared hit=62,147 read=11,048 dirtied=2
2. 7,759.925 10,112.258 ↑ 257.8 34 1

Gather Merge (cost=2,438,423.14..2,439,527.27 rows=8,764 width=64) (actual time=10,091.223..10,112.258 rows=34 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
  • Buffers: shared hit=357,411 read=1,436,882 dirtied=10
3. 4.587 2,352.333 ↑ 313.0 7 5 / 5

GroupAggregate (cost=2,437,423.08..2,437,483.34 rows=2,191 width=64) (actual time=2,347.744..2,352.333 rows=7 loops=5)

  • Group Key: stats_subpublisher_general_old.date, core_campaign.app_id, core_app.name, core_app.platform
  • Buffers: shared hit=357,411 read=1,436,882 dirtied=10
4. 7.915 2,347.746 ↓ 10.6 23,303 5 / 5

Sort (cost=2,437,423.08..2,437,428.56 rows=2,191 width=35) (actual time=2,346.765..2,347.746 rows=23,303 loops=5)

  • Sort Key: stats_subpublisher_general_old.date, core_app.name, core_app.platform
  • Sort Method: quicksort Memory: 30kB
  • Buffers: shared hit=357,411 read=1,436,882 dirtied=10
5. 2.187 2,339.831 ↓ 10.6 23,303 5 / 5

Nested Loop (cost=1.28..2,437,301.51 rows=2,191 width=35) (actual time=73.18..2,339.831 rows=23,303 loops=5)

  • Buffers: shared hit=357,351 read=1,436,882 dirtied=10
6. 0.069 99.220 ↓ 4.3 60 5 / 5

Nested Loop (cost=0.7..411,798.46 rows=14 width=32) (actual time=45.124..99.22 rows=60 loops=5)

  • Buffers: shared hit=154,695 read=1,394 dirtied=10
7. 98.789 98.789 ↓ 4.3 60 5 / 5

Index Scan using core_campaign_pkey on core_campaign core_campaign (cost=0.42..411,738.12 rows=14 width=8) (actual time=45.06..98.789 rows=60 loops=5)

  • Filter: (core_campaign.app_id = 4,404)
  • Buffers: shared hit=153,649 read=1,394 dirtied=10
8. 0.362 0.362 ↑ 1.0 1 302 / 5

Index Scan using core_app_pkey on core_app core_app (cost=0.28..4.3 rows=1 width=28) (actual time=0.006..0.006 rows=1 loops=302)

  • Index Cond: (core_app.id = 4,404)
  • Filter: (core_app.customer_id = 857)
  • Buffers: shared hit=1,046
9. 2,238.424 2,238.424 ↑ 10.8 386 302 / 5

Index Scan using stats_subpublisher_general_campaign_id_7991bdcb on stats_subpublisher_general_old stats_subpublisher_general_old (cost=0.58..144,637.15 rows=4,164 width=11) (actual time=1.108..37.06 rows=386 loops=302)

  • Index Cond: (stats_subpublisher_general_old.campaign_id = core_campaign.id)
  • Filter: ((stats_subpublisher_general_old.date <= '2020-06-30'::date) AND (stats_subpublisher_general_old.date >= '2020-06-24'::date))
  • Buffers: shared hit=202,656 read=1,435,488
Planning time : 6.734 ms
Execution time : 10,112.494 ms