explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BqeL : Optimization for: plan #yO4l

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.093 684.050 ↓ 0.0 0 1

Sort (cost=692,196.87..692,601.78 rows=161,961 width=56) (actual time=683.967..684.050 rows=0 loops=1)

  • Sort Key: hotel.foxtrot, hotel.mike DESC, hotel.lima DESC
  • Sort Method: quicksort Memory: 25kB
2.          

CTE hotel

3. 0.002 684.039 ↓ 0.0 0 1

Recursive Union (cost=122,378.57..674,943.75 rows=161,961 width=56) (actual time=683.956..684.039 rows=0 loops=1)

4. 0.004 684.032 ↓ 0.0 0 1

Sort (cost=122,378.57..122,777.90 rows=159,731 width=56) (actual time=683.951..684.032 rows=0 loops=1)

  • Sort Key: (five(echo.sierra)) DESC
  • Sort Method: quicksort Memory: 25kB
5. 97.446 684.028 ↓ 0.0 0 1

Finalize HashAggregate (cost=106,976.29..108,573.60 rows=159,731 width=56) (actual time=683.947..684.028 rows=0 loops=1)

  • Group Key: echo.sierra
  • Filter: (five(echo.sierra) > 1)
  • Rows Removed by Filter: 172,336
6. 45.932 586.582 ↓ 1.3 172,336 1

Gather (cost=92,001.41..105,977.96 rows=133,110 width=16) (actual time=526.511..586.582 rows=172,336 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 56.172 540.650 ↑ 1.2 57,445 3 / 3

Partial HashAggregate (cost=91,001.41..91,666.96 rows=66,555 width=16) (actual time=520.492..540.650 rows=57,445 loops=3)

  • Group Key: echo.sierra
8. 484.478 484.478 ↑ 1.2 57,445 3 / 3

Parallel Seq Scan on echo (cost=0.00..90,668.64 rows=66,555 width=8) (actual time=296.195..484.478 rows=57,445 loops=3)

  • Filter: (victor_five >= 'india'::timestamp without time zone)
  • Rows Removed by Filter: 1,863,393
9. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.43..54,892.66 rows=223 width=56) (actual time=0.004..0.005 rows=0 loops=1)

10. 0.004 0.004 ↓ 0.0 0 1

WorkTable Scan on (cost=0.00..35,939.47 rows=7,987 width=8) (actual time=0.003..0.004 rows=0 loops=1)

  • Filter: (mike = 'delta'::text)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using papa on echo victor_romeo (cost=0.43..2.36 rows=1 width=16) (never executed)

  • Index Cond: (sierra = juliet1.foxtrot)
  • Filter: (victor_five >= 'india'::timestamp without time zone)
12. 683.957 683.957 ↓ 0.0 0 1

CTE Scan on hotel (cost=0.00..3,239.22 rows=161,961 width=56) (actual time=683.957..683.957 rows=0 loops=1)

Planning time : 0.188 ms
Execution time : 690.272 ms