explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jHTj

Settings
# exclusive inclusive rows x rows loops node
1. 89.256 89.256 ↑ 41,078.3 96,253 1

CTE Scan on "сut_by_time" (cost=119,189,040.23..198,267,220.23 rows=3,953,909,000 width=32) (actual time=0.045..89.256 rows=96,253 loops=1)

2.          

CTE series

3. 0.081 0.104 ↑ 76.9 13 1

WindowAgg (cost=59.83..77.33 rows=1,000 width=16) (actual time=0.018..0.104 rows=13 loops=1)

4. 0.016 0.023 ↑ 76.9 13 1

Sort (cost=59.83..62.33 rows=1,000 width=8) (actual time=0.011..0.023 rows=13 loops=1)

  • Sort Key: date.date
  • Sort Method: quicksort Memory: 25kB
5. 0.007 0.007 ↑ 76.9 13 1

Function Scan on generate_series date (cost=0.00..10.00 rows=1,000 width=8) (actual time=0.005..0.007 rows=13 loops=1)

6.          

CTE сut_by_time

7. 17.237 57.918 ↑ 41,078.3 96,253 1

Nested Loop (cost=0.56..119,188,962.90 rows=3,953,909,000 width=32) (actual time=0.044..57.918 rows=96,253 loops=1)

8. 0.121 0.121 ↑ 76.9 13 1

CTE Scan on series (cost=0.00..20.00 rows=1,000 width=16) (actual time=0.019..0.121 rows=13 loops=1)

9. 40.560 40.560 ↑ 534.0 7,404 13

Index Scan using stats_players_created_at_idx on stats_players (cost=0.56..79,649.85 rows=3,953,909 width=16) (actual time=0.016..3.120 rows=7,404 loops=13)

  • Index Cond: ((created_at >= series.p1) AND (created_at <= series.p2))
Planning time : 0.122 ms
Execution time : 94.758 ms