explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KwJe

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 7,199.556 ↑ 1.0 1 1

Aggregate (cost=450,873.09..450,873.10 rows=1 width=16) (actual time=7,199.556..7,199.556 rows=1 loops=1)

  • Output: ((sum(a.sl))::real * '100'::double precision), count(a.id)
  • Buffers: shared hit=218,355 read=216,821
2. 38.828 7,199.529 ↓ 5.2 136 1

Nested Loop (cost=334,664.83..450,872.96 rows=26 width=12) (actual time=7,198.822..7,199.529 rows=136 loops=1)

  • Output: a.sl, a.id
  • Inner Unique: true
  • Buffers: shared hit=218,355 read=216,821
3. 12.410 6,998.623 ↓ 1.0 54,026 1

Unique (cost=334,664.40..334,923.55 rows=51,460 width=16) (actual time=6,978.479..6,998.623 rows=54,026 loops=1)

  • Output: msg_log_appeals.appeal_id, msg_log_appeals.user_id
  • Buffers: shared hit=1,041 read=216,821
4. 35.862 6,986.213 ↓ 1.0 54,165 1

Sort (cost=334,664.40..334,793.98 rows=51,831 width=16) (actual time=6,978.477..6,986.213 rows=54,165 loops=1)

  • Output: msg_log_appeals.appeal_id, msg_log_appeals.user_id
  • Sort Key: msg_log_appeals.appeal_id
  • Sort Method: quicksort Memory: 4,075kB
  • Buffers: shared hit=1,041 read=216,821
5. 10.746 6,950.351 ↓ 1.0 54,165 1

Gather (cost=1,000.00..330,605.64 rows=51,831 width=16) (actual time=0.589..6,950.351 rows=54,165 loops=1)

  • Output: msg_log_appeals.appeal_id, msg_log_appeals.user_id
  • Workers Planned: 2
  • Workers Launched: 0
  • Buffers: shared hit=1,041 read=216,821
6. 6,939.605 6,939.605 ↓ 2.5 54,165 1

Parallel Seq Scan on public.msg_log_appeals (cost=0.00..324,422.54 rows=21,596 width=16) (actual time=0.151..6,939.605 rows=54,165 loops=1)

  • Output: msg_log_appeals.appeal_id, msg_log_appeals.user_id
  • Filter: (msg_log_appeals.user_id = 18,782)
  • Rows Removed by Filter: 19,945,762
  • Buffers: shared hit=1,041 read=216,821
7. 162.078 162.078 ↓ 0.0 0 54,026

Index Scan using msg_appeals_pkey on public.msg_appeals a (cost=0.43..2.24 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=54,026)

  • Output: a.id, a.dialog_id, a.date_start, a.date_end, a.is_open, a.processed, a.rating, a.answer, a.active, a.group_id, a.sl, a.bot_state, a.greeting, a.chat_by_code, a.service_tag_id, a.service_region_id, a.last_client_profile_id, a.region_id
  • Index Cond: (a.id = msg_log_appeals.appeal_id)
  • Filter: ((a.date_start >= 1,578,862,800) AND (a.date_start < 1578949200))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=217,314
Planning time : 0.304 ms
Execution time : 7,200.530 ms