explain.depesz.com

A tool for finding a real cause for slow queries.

Result: VDT

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

Sort (cost=27011357.45..27011357.95 rows=200 width=8) (actual time=5645.031..5645.032 rows=18 loops=1)

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

CTE date_list

3. 0.128 0.204 ↑ 52.6 19 1

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

4.          

Initplan (forFunction Scan)

5. 0.004 0.050 ↑ 1.0 1 1

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

6.          

Initplan (forResult)

7. 0.000 0.046 ↑ 1.0 1 1

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

8. 0.046 0.046 ↑ 5946469.0 1 1

Index Scan using date on netflows (cost=0.00..303705.14 rows=5946469 width=8) (actual time=0.046..0.046 rows=1 loops=1)

  • Index Cond: (datetime IS NOT NULL)
9. 0.000 0.026 ↑ 1.0 1 1

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

10.          

Initplan (forResult)

11. 0.000 0.026 ↑ 1.0 1 1

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

12. 0.026 0.026 ↑ 5946469.0 1 1

Index Scan Backward using date on netflows (cost=0.00..303705.14 rows=5946469 width=8) (actual time=0.026..0.026 rows=1 loops=1)

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

HashAggregate (cost=27011335.17..27011337.17 rows=200 width=8) (actual time=5645.005..5645.009 rows=18 loops=1)

14. 1057.840 4176.406 ↑ 111.1 5946329 1

Nested Loop (cost=0.00..23707741.28 rows=660718778 width=8) (actual time=0.134..4176.406 rows=5946329 loops=1)

15. 0.343 0.343 ↑ 52.6 19 1

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

16. 3118.223 3118.223 ↑ 2.1 312965 19

Index Scan using date on netflows (cost=0.00..13796.94 rows=660719 width=8) (actual time=0.026..164.117 rows=312965 loops=19)

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