explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jG7T

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 3,526.059 ↓ 0.0 0 1

Sort (cost=17,512,785.80..17,534,237.22 rows=8,580,568 width=56) (actual time=3,526.057..3,526.059 rows=0 loops=1)

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

CTE hotel

3. 0.001 3,526.051 ↓ 0.0 0 1

Recursive Union (cost=965,397.74..16,181,228.95 rows=8,580,568 width=56) (actual time=3,526.049..3,526.051 rows=0 loops=1)

4. 0.002 3,526.047 ↓ 0.0 0 1

Sort (cost=965,397.74..979,698.69 rows=5,720,378 width=56) (actual time=3,526.046..3,526.047 rows=0 loops=1)

  • Sort Key: (five(echo.sierra)) DESC
  • Sort Method: quicksort Memory: 25kB
5. 2,070.354 3,526.045 ↓ 0.0 0 1

GroupAggregate (cost=0.43..208,830.49 rows=5,720,378 width=56) (actual time=3,526.044..3,526.045 rows=0 loops=1)

  • Group Key: echo.sierra
  • Filter: (five(echo.sierra) > 1)
  • Rows Removed by Filter: 5,759,509
6. 1,455.691 1,455.691 ↓ 1.0 5,759,509 1

Index Only Scan using papa on echo (cost=0.43..108,723.88 rows=5,720,378 width=8) (actual time=0.053..1,455.691 rows=5,759,509 loops=1)

  • Heap Fetches: 467,633
7. 0.001 0.003 ↓ 0.0 0 1

Nested Loop (cost=0.43..1,502,991.89 rows=286,019 width=56) (actual time=0.002..0.003 rows=0 loops=1)

8. 0.002 0.002 ↓ 0.0 0 1

WorkTable Scan on (cost=0.00..1,287,085.05 rows=286,019 width=8) (actual time=0.001..0.002 rows=0 loops=1)

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

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

  • Index Cond: (sierra = juliet1.foxtrot)
10. 3,526.051 3,526.051 ↓ 0.0 0 1

CTE Scan on hotel (cost=0.00..171,611.36 rows=8,580,568 width=56) (actual time=3,526.051..3,526.051 rows=0 loops=1)

Planning time : 0.175 ms
Execution time : 3,526.094 ms