explain.depesz.com

A tool for finding a real cause for slow queries.

Result: noX

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 7.876 89647.055 ↑ 11.1 18 1

Sort (cost=27007355.59..27007356.09 rows=200 width=8) (actual time=89647.054..89647.055 rows=18 loops=1)

  • Sort Key: date_list.start_date
  • Sort Method: quicksort Memory: 25kB
  • Total runtime: 89668.047 ms
2.          

CTE date_list

3. 9.610 92.667 ↑ 52.6 19 1

Function Scan on generate_series series (cost=0.13..12.63 rows=1000 width=8) (actual time=92.567..92.667 rows=19 loops=1)

4.          

Initplan (forFunction Scan)

5. 0.009 71.270 ↑ 1.0 1 1

Result (cost=0.05..0.06 rows=1 width=0) (actual time=71.270..71.270 rows=1 loops=1)

6.          

Initplan (forResult)

7. 0.009 71.261 ↑ 1.0 1 1

Limit (cost=0.00..0.05 rows=1 width=8) (actual time=71.259..71.261 rows=1 loops=1)

8. 71.252 71.252 ↑ 5945591.0 1 1

Index Scan using date on netflows (cost=0.00..303662.15 rows=5945591 width=8) (actual time=71.252..71.252 rows=1 loops=1)

  • Index Cond: (datetime IS NOT NULL)
9. 0.008 11.787 ↑ 1.0 1 1

Result (cost=0.05..0.06 rows=1 width=0) (actual time=11.786..11.787 rows=1 loops=1)

10.          

Initplan (forResult)

11. 0.003 11.779 ↑ 1.0 1 1

Limit (cost=0.00..0.05 rows=1 width=8) (actual time=11.778..11.779 rows=1 loops=1)

12. 11.776 11.776 ↑ 5945591.0 1 1

Index Scan Backward using date on netflows (cost=0.00..303662.15 rows=5945591 width=8) (actual time=11.776..11.776 rows=1 loops=1)

  • Index Cond: (datetime IS NOT NULL)
13. 1579.603 89639.179 ↑ 11.1 18 1

HashAggregate (cost=27007333.31..27007335.31 rows=200 width=8) (actual time=89639.167..89639.179 rows=18 loops=1)

14. 1100.995 88059.576 ↑ 111.1 5945457 1

Nested Loop (cost=0.00..23704227.20 rows=660621222 width=8) (actual time=92.667..88059.576 rows=5945457 loops=1)

15. 92.785 92.785 ↑ 52.6 19 1

CTE Scan on date_list (cost=0.00..20.00 rows=1000 width=16) (actual time=92.578..92.785 rows=19 loops=1)

16. 86865.796 86865.796 ↑ 2.1 312919 19

Index Scan using date on netflows (cost=0.00..13794.89 rows=660621 width=8) (actual time=2.438..4571.884 rows=312919 loops=19)

  • Index Cond: ((datetime >= date_list.start_date) AND (datetime <= date_list.end_date))