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 5,645.032 ↑ 11.1 18 1

Sort (cost=27,011,357.45..27,011,357.95 rows=200 width=8) (actual time=5,645.031..5,645.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=1,000 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 ↑ 5,946,469.0 1 1

Index Scan using date on netflows (cost=0.00..303,705.14 rows=5,946,469 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 ↑ 5,946,469.0 1 1

Index Scan Backward using date on netflows (cost=0.00..303,705.14 rows=5,946,469 width=8) (actual time=0.026..0.026 rows=1 loops=1)

  • Index Cond: (datetime IS NOT NULL)
13. 1,468.603 5,645.009 ↑ 11.1 18 1

HashAggregate (cost=27,011,335.17..27,011,337.17 rows=200 width=8) (actual time=5,645.005..5,645.009 rows=18 loops=1)

14. 1,057.840 4,176.406 ↑ 111.1 5,946,329 1

Nested Loop (cost=0.00..23,707,741.28 rows=660,718,778 width=8) (actual time=0.134..4,176.406 rows=5,946,329 loops=1)

15. 0.343 0.343 ↑ 52.6 19 1

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

16. 3,118.223 3,118.223 ↑ 2.1 312,965 19

Index Scan using date on netflows (cost=0.00..13,796.94 rows=660,719 width=8) (actual time=0.026..164.117 rows=312,965 loops=19)

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