explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yw7r

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 25,416.221 ↑ 1.4 12,525 1

Finalize GroupAggregate (cost=2,507,666.88..2,512,430.35 rows=18,088 width=24) (actual time=25,388.073..25,416.221 rows=12,525 loops=1)

  • Group Key: rt.policy_id, rt.hotel_id
2. 112.546 25,491.523 ↓ 1.0 37,241 1

Gather Merge (cost=2,507,666.88..2,511,887.71 rows=36,176 width=24) (actual time=25,388.056..25,491.523 rows=37,241 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 8.941 25,378.977 ↑ 1.5 12,414 3 / 3

Sort (cost=2,506,666.85..2,506,712.07 rows=18,088 width=24) (actual time=25,376.875..25,378.977 rows=12,414 loops=3)

  • Sort Key: rt.policy_id, rt.hotel_id
  • Sort Method: quicksort Memory: 1,354kB
  • Worker 0: Sort Method: quicksort Memory: 1,355kB
  • Worker 1: Sort Method: quicksort Memory: 1,355kB
4. 2,169.884 25,370.036 ↑ 1.5 12,414 3 / 3

Partial HashAggregate (cost=2,505,206.90..2,505,387.78 rows=18,088 width=24) (actual time=25,364.686..25,370.036 rows=12,414 loops=3)

  • Group Key: rt.policy_id, rt.hotel_id
5. 2,033.249 23,200.152 ↑ 1.2 4,673,260 3 / 3

Hash Join (cost=1,142.00..2,447,148.16 rows=5,805,874 width=20) (actual time=33.446..23,200.152 rows=4,673,260 loops=3)

  • Hash Cond: (r.rate_type_id = rt.id)
6. 21,135.589 21,135.589 ↑ 1.2 4,673,260 3 / 3

Parallel Seq Scan on rates r (cost=0.00..2,430,763.12 rows=5,805,874 width=12) (actual time=1.807..21,135.589 rows=4,673,260 loops=3)

  • Filter: ((NOT close_out) AND ((price IS NOT NULL) OR (single_price IS NOT NULL)) AND (rate_day >= now()))
  • Rows Removed by Filter: 14,535,878
7. 9.769 31.314 ↑ 1.0 24,577 3 / 3

Hash (cost=834.22..834.22 rows=24,622 width=24) (actual time=31.314..31.314 rows=24,577 loops=3)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,601kB
8. 21.545 21.545 ↑ 1.0 24,577 3 / 3

Seq Scan on rate_types rt (cost=0.00..834.22 rows=24,622 width=24) (actual time=0.048..21.545 rows=24,577 loops=3)

  • Filter: ((hotel_id IS NOT NULL) AND (policy_id IS NOT NULL))
Planning time : 0.871 ms
Execution time : 25,505.691 ms