explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SyU27

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 278.439 ↑ 34.0 1 1

Sort (cost=25,405.59..25,405.67 rows=34 width=26) (actual time=278.438..278.439 rows=1 loops=1)

  • Sort Key: (count(s.*))
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21185
2. 0.005 278.427 ↑ 34.0 1 1

GroupAggregate (cost=25,403.87..25,404.72 rows=34 width=26) (actual time=278.427..278.427 rows=1 loops=1)

  • Group Key: c.client_name
  • Buffers: shared hit=21185
3. 0.000 278.422 ↑ 22.7 3 1

Sort (cost=25,403.87..25,404.04 rows=68 width=26) (actual time=278.422..278.422 rows=3 loops=1)

  • Sort Key: c.client_name
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=21185
4. 17.982 281.044 ↑ 22.7 3 1

Gather (cost=25,394.66..25,401.8 rows=68 width=26) (actual time=278.212..281.044 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=21185
5. 48.014 263.062 ↑ 34.0 1 3 / 3

HashAggregate (cost=24,394.66..24,395 rows=34 width=26) (actual time=263.062..263.062 rows=1 loops=3)

  • Group Key: c.client_name
  • Buffers: shared hit=21177
6. 52.961 215.048 ↓ 2.6 186,328 3 / 3

Hash Join (cost=3.76..24,037.71 rows=71,391 width=311) (actual time=0.442..215.048 rows=186,328 loops=3)

  • Buffers: shared hit=21177
7. 162.027 162.027 ↓ 2.6 186,328 3 / 3

Seq Scan on sale s (cost=0..23,823.18 rows=71,391 width=309) (actual time=0.345..162.027 rows=186,328 loops=3)

  • Filter: upper_inf(s.active_range)
  • Buffers: shared hit=21146
8. 0.020 0.060 ↑ 1.0 34 3 / 3

Hash (cost=3.34..3.34 rows=34 width=34) (actual time=0.06..0.06 rows=34 loops=3)

  • Buffers: shared hit=9
9. 0.040 0.040 ↑ 1.0 34 3 / 3

Seq Scan on client c (cost=0..3.34 rows=34 width=34) (actual time=0.021..0.04 rows=34 loops=3)

  • Buffers: shared hit=9
Planning time : 0.56 ms
Execution time : 281.232 ms