explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yO4l

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.008 2,539.875 ↓ 0.0 0 1

Sort (cost=17,512,882.60..17,534,334.02 rows=8,580,568 width=56) (actual time=2,539.872..2,539.875 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 2,539.868 ↓ 0.0 0 1

Recursive Union (cost=965,406.54..16,181,325.75 rows=8,580,568 width=56) (actual time=2,539.866..2,539.868 rows=0 loops=1)

4. 0.003 2,539.862 ↓ 0.0 0 1

Sort (cost=965,406.54..979,707.49 rows=5,720,378 width=56) (actual time=2,539.861..2,539.862 rows=0 loops=1)

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

GroupAggregate (cost=0.43..208,839.29 rows=5,720,378 width=56) (actual time=2,539.858..2,539.859 rows=0 loops=1)

  • Group Key: echo.sierra
  • Filter: (five(echo.sierra) > 1)
  • Rows Removed by Filter: 5,762,497
6. 935.645 935.645 ↓ 1.0 5,762,497 1

Index Only Scan using papa on echo (cost=0.43..108,732.68 rows=5,720,378 width=8) (actual time=0.029..935.645 rows=5,762,497 loops=1)

  • Heap Fetches: 470,621
7. 0.001 0.004 ↓ 0.0 0 1

Nested Loop (cost=0.43..1,503,000.69 rows=286,019 width=56) (actual time=0.003..0.004 rows=0 loops=1)

8. 0.003 0.003 ↓ 0.0 0 1

WorkTable Scan on (cost=0.00..1,287,085.05 rows=286,019 width=8) (actual time=0.003..0.003 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. 2,539.867 2,539.867 ↓ 0.0 0 1

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

Planning time : 0.196 ms
Execution time : 2,539.920 ms