explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YzsK

Settings
# exclusive inclusive rows x rows loops node
1. 897.397 1,986.091 ↑ 1.8 134,504 1

HashAggregate (cost=424,892.76..428,576.06 rows=245,553 width=102) (actual time=1,935.311..1,986.091 rows=134,504 loops=1)

  • Group Key: c.id
2. 0.000 1,088.694 ↓ 12.4 3,035,974 1

Gather (cost=251,778.08..420,595.58 rows=245,553 width=54) (actual time=398.958..1,088.694 rows=3,035,974 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
3. 218.446 1,410.672 ↓ 9.9 607,195 5

Parallel Hash Join (cost=250,778.08..395,040.28 rows=61,388 width=54) (actual time=395.512..1,410.672 rows=607,195 loops=5)

  • Hash Cond: (v.channel_id = c.id)
4. 58.346 797.797 ↓ 1.0 652,497 5

Parallel Append (cost=0.12..142,588.60 rows=637,611 width=41) (actual time=0.055..797.797 rows=652,497 loops=5)

5. 739.445 739.445 ↓ 1.0 652,497 5

Parallel Index Only Scan using videos_y2019_q3_channel_id_published_id_view_count_comment__idx on videos_y2019_q3 v (cost=0.56..139,399.30 rows=637,611 width=41) (actual time=0.048..739.445 rows=652,497 loops=5)

  • Filter: (((published > '2019-08-01 00:00:00+00'::timestamp with time zone) AND (published < '2019-09-01 00:00:00+00'::timestamp with time zone)) OR ((published > '2019-07-01 00:00:00+00'::timestamp with time zone) AND (published < '2019-08-01 00:00:00+00'::timestamp with time zone)))
  • Rows Removed by Filter: 37311
  • Heap Fetches: 191996
6. 0.006 0.006 ↓ 0.0 0 3

Parallel Index Only Scan using videos_default_channel_id_published_id_view_count_comment_c_idx on videos_default v_1 (cost=0.12..1.24 rows=1 width=48) (actual time=0.005..0.006 rows=0 loops=3)

  • Filter: (((published > '2019-08-01 00:00:00+00'::timestamp with time zone) AND (published < '2019-09-01 00:00:00+00'::timestamp with time zone)) OR ((published > '2019-07-01 00:00:00+00'::timestamp with time zone) AND (published < '2019-08-01 00:00:00+00'::timestamp with time zone)))
  • Heap Fetches: 0
7. 29.702 394.429 ↑ 1.3 75,528 5

Parallel Hash (cost=249,584.73..249,584.73 rows=95,458 width=38) (actual time=394.429..394.429 rows=75,528 loops=5)

  • Buckets: 524288 Batches: 1 Memory Usage: 31552kB
8. 282.041 364.727 ↑ 1.3 75,528 5

Parallel Bitmap Heap Scan on channels c (cost=5,256.21..249,584.73 rows=95,458 width=38) (actual time=146.548..364.727 rows=75,528 loops=5)

  • Recheck Cond: ((subscriber_count >= 1000) AND (subscriber_count <= 100000000))
  • Heap Blocks: exact=51350
9. 82.686 82.686 ↓ 1.2 449,972 1

Bitmap Index Scan on channels_subscriber_count_idx (cost=0.00..5,160.75 rows=381,832 width=0) (actual time=82.685..82.686 rows=449,972 loops=1)

  • Index Cond: ((subscriber_count >= 1000) AND (subscriber_count <= 100000000))
Planning time : 2.778 ms