explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EdGE

Settings
# exclusive inclusive rows x rows loops node
1. 0.055 526.498 ↑ 186.0 31 1

WindowAgg (cost=50,589.83..50,718.42 rows=5,767 width=88) (actual time=525.002..526.498 rows=31 loops=1)

2. 0.019 526.443 ↑ 186.0 31 1

Merge Left Join (cost=50,589.83..50,686.71 rows=5,767 width=24) (actual time=524.939..526.443 rows=31 loops=1)

  • Merge Cond: ((generate_series('2020-08-01 00:00:00'::timestamp without time zone, '2020-08-31 00:00:00'::timestamp without time zone, '1 day'::interval)) = (date_trunc('day'::text, impressions_tb.date)))
3. 0.010 0.726 ↑ 34.7 31 1

Sort (cost=450.97..451.51 rows=1,075 width=16) (actual time=0.723..0.726 rows=31 loops=1)

  • Sort Key: (generate_series('2020-08-01 00:00:00'::timestamp without time zone, '2020-08-31 00:00:00'::timestamp without time zone, '1 day'::interval))
  • Sort Method: quicksort Memory: 26kB
4. 0.013 0.716 ↑ 34.7 31 1

Hash Left Join (cost=435.10..440.15 rows=1,075 width=16) (actual time=0.703..0.716 rows=31 loops=1)

  • Hash Cond: ((generate_series('2020-08-01 00:00:00'::timestamp without time zone, '2020-08-31 00:00:00'::timestamp without time zone, '1 day'::interval)) = anon_3.date)
5. 0.009 0.009 ↑ 32.3 31 1

ProjectSet (cost=0.00..1.50 rows=1,000 width=8) (actual time=0.003..0.009 rows=31 loops=1)

6. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.00 rows=1 width=0) (actual time=0.000..0.000 rows=1 loops=1)

7. 0.006 0.694 ↑ 7.2 30 1

Hash (cost=434.35..434.35 rows=215 width=16) (actual time=0.694..0.694 rows=30 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
8. 0.004 0.688 ↑ 7.2 30 1

Subquery Scan on anon_3 (cost=432.63..434.35 rows=215 width=16) (actual time=0.643..0.688 rows=30 loops=1)

9. 0.036 0.684 ↑ 7.2 30 1

GroupAggregate (cost=432.63..433.71 rows=215 width=16) (actual time=0.642..0.684 rows=30 loops=1)

  • Group Key: (date_trunc('day'::text, likes_tb.created_at))
10. 0.063 0.648 ↑ 1.0 215 1

Sort (cost=432.63..432.74 rows=215 width=16) (actual time=0.638..0.648 rows=215 loops=1)

  • Sort Key: (date_trunc('day'::text, likes_tb.created_at))
  • Sort Method: quicksort Memory: 35kB
11. 0.585 0.585 ↑ 1.0 215 1

Index Scan using likes_tb_pkey on likes_tb (cost=0.08..430.96 rows=215 width=16) (actual time=0.019..0.585 rows=215 loops=1)

  • Index Cond: (id = ANY ('{155147,155150,155224,155269,155294,155307,155377,155392,155420,155451,155462,155533,155548,155550,155583,155604,155653,155680,155688,155714,155745,155787,155793,155826,155846,155859,155934,155943,155983,155992,156109,156140,156150,156166,156204,156433,156508,156537,156617,156647,156679,156683,156704,156727,156756,156799,156806,156811,156852,156877,156931,156954,156970,157125,157168,157247,157271,157281,157285,157365,157470,157549,157611,157645,157654,157657,157676,157720,157735,157749,157766,157789,157796,157812,157826,158056,158095,158169,158202,158324,158404,158415,158455,158468,158502,158522,158541,158581,158622,158623,158632,158697,158703,158718,158729,158736,158745,158752,158769,159032,159049,159053,159227,159268,159284,159293,159323,159360,159413,159427,159458,159466,159498,159547,159566,159584,159588,159601,159681,159707,159718,159731,159739,159756,159774,159822,159841,159859,159882,159918,159926,159931,159938,159955,159990,160042,160049,160055,160074,160129,160133,160139,160168,160173,160178,160234,160277,160278,160319,160357,160384,160478,160504,160517,160529,160554,160603,160662,160682,160701,160706,160726,160743,160749,160769,160774,160795,160824,160841,160855,160872,160942,160969,160982,160995,161024,161054,161077,161081,161088,161147,161225,161244,161289,161301,161336,161378,161383,161393,161402,161424,161447,161475,161520,161523,161527,161626,161730,161741,161788,161792,161858,161882,161886,161925,161939,161956,161985,162004,162017,162028,162033,162085,162092,162096}'::integer[]))
12. 0.000 525.698 ↑ 34.6 31 1

Finalize GroupAggregate (cost=50,138.86..50,213.60 rows=1,073 width=16) (actual time=524.213..525.698 rows=31 loops=1)

  • Group Key: (date_trunc('day'::text, impressions_tb.date))
13. 30.849 544.438 ↑ 10.2 62 1

Gather Merge (cost=50,138.86..50,209.21 rows=631 width=16) (actual time=524.157..544.438 rows=62 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
14. 1.203 513.589 ↑ 20.4 31 2 / 2

Partial GroupAggregate (cost=49,138.85..49,142.01 rows=631 width=16) (actual time=512.145..513.589 rows=31 loops=2)

  • Group Key: (date_trunc('day'::text, impressions_tb.date))
15. 1.483 512.386 ↓ 8.5 5,372 2 / 2

Sort (cost=49,138.85..49,139.17 rows=631 width=16) (actual time=512.122..512.386 rows=5,372 loops=2)

  • Sort Key: (date_trunc('day'::text, impressions_tb.date))
  • Sort Method: quicksort Memory: 455kB
16. 0.000 510.903 ↓ 8.5 5,372 2 / 2

Nested Loop (cost=0.17..49,132.99 rows=631 width=16) (actual time=0.243..510.903 rows=5,372 loops=2)

17. 70.318 70.318 ↓ 5.4 91,274 2 / 2

Parallel Index Scan using idx_impression_date_2 on impressions_tb (cost=0.09..471.98 rows=16,857 width=12) (actual time=0.023..70.318 rows=91,274 loops=2)

  • Index Cond: ((date > '2020-08-01 00:00:00'::timestamp without time zone) AND (date < '2020-09-01 00:00:00'::timestamp without time zone))
18. 456.373 456.373 ↓ 0.0 0 182,549 / 2

Index Scan using job_tb_pkey on job_tb (cost=0.09..2.89 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=182,549)

  • Index Cond: (id = impressions_tb.job_id)
  • Filter: ((source)::text = 'Time4Change'::text)
  • Rows Removed by Filter: 1