explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K6wh

Settings
# exclusive inclusive rows x rows loops node
1. 0.087 1.865 ↑ 1.0 100 1

Limit (cost=1.20..11.93 rows=100 width=126) (actual time=1.441..1.865 rows=100 loops=1)

  • Buffers: shared hit=499
2. 0.649 1.778 ↑ 70,280.1 100 1

Merge Left Join (cost=1.20..753,901.07 rows=7,028,011 width=126) (actual time=1.440..1.778 rows=100 loops=1)

  • Merge Cond: (comments_2019_2.from_user_id = users.user_id)
  • Buffers: shared hit=499
3. 0.089 0.259 ↑ 70,280.1 100 1

Merge Append (cost=0.92..665,812.08 rows=7,028,011 width=51) (actual time=0.017..0.259 rows=100 loops=1)

  • Sort Key: comments_2019_2.from_user_id
  • Buffers: shared hit=15
4. 0.003 0.003 ↓ 0.0 0 1

Index Scan using comments_2019_2_from_user_id_idx on comments_2019_2 (cost=0.15..58.95 rows=5 width=56) (actual time=0.002..0.003 rows=0 loops=1)

  • Filter: ((created >= (date_trunc('month'::text, now()))::timestamp without time zone) AND (created <= ((date_trunc('month'::text, (now() + '1 mon'::interval)) - '1 day'::interval))::timestamp without time zone))
  • Buffers: shared hit=1
5. 0.003 0.003 ↓ 0.0 0 1

Index Scan using comments_2019_3_from_user_id_idx on comments_2019_3 (cost=0.15..9,790.24 rows=1 width=51) (actual time=0.002..0.003 rows=0 loops=1)

  • Filter: ((created >= (date_trunc('month'::text, now()))::timestamp without time zone) AND (created <= ((date_trunc('month'::text, (now() + '1 mon'::interval)) - '1 day'::interval))::timestamp without time zone))
  • Buffers: shared hit=1
6. 0.162 0.162 ↑ 70,280.0 100 1

Index Scan using comments_2019_4_from_user_id_idx on comments_2019_4 (cost=0.43..550,483.74 rows=7,028,000 width=51) (actual time=0.010..0.162 rows=100 loops=1)

  • Filter: ((created >= (date_trunc('month'::text, now()))::timestamp without time zone) AND (created <= ((date_trunc('month'::text, (now() + '1 mon'::interval)) - '1 day'::interval))::timestamp without time zone))
  • Buffers: shared hit=12
7. 0.002 0.002 ↓ 0.0 0 1

Index Scan using comments_2019_5_from_user_id_idx on comments_2019_5 (cost=0.15..58.95 rows=5 width=56) (actual time=0.001..0.002 rows=0 loops=1)

  • Filter: ((created >= (date_trunc('month'::text, now()))::timestamp without time zone) AND (created <= ((date_trunc('month'::text, (now() + '1 mon'::interval)) - '1 day'::interval))::timestamp without time zone))
  • Buffers: shared hit=1
8. 0.870 0.870 ↑ 1.2 1,395 1

Index Scan using pk_users on users (cost=0.28..234.83 rows=1,606 width=79) (actual time=0.005..0.870 rows=1,395 loops=1)

  • Buffers: shared hit=484