explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kEjN : overlap approach

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1.675 ↑ 50.0 1 1

Limit (cost=0.00..36.60 rows=50 width=818) (actual time=0.020..1.675 rows=1 loops=1)

2. 0.005 1.674 ↑ 1,178.0 1 1

Append (cost=0.00..862.32 rows=1,178 width=818) (actual time=0.020..1.674 rows=1 loops=1)

3. 0.002 0.002 ↓ 0.0 0 1

Seq Scan on video (cost=0.00..0.00 rows=1 width=272) (actual time=0.002..0.002 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
4. 0.006 0.006 ↓ 0.0 0 1

Index Scan using idx_2018_05_video_veiculo_inicio on video video_1 (cost=0.15..8.17 rows=1 width=272) (actual time=0.005..0.006 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
5. 0.067 0.067 ↑ 39.0 1 1

Seq Scan on video video_2 (cost=0.00..21.08 rows=39 width=911) (actual time=0.011..0.067 rows=1 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 153
6. 0.116 0.116 ↓ 0.0 0 1

Seq Scan on video video_3 (cost=0.00..33.08 rows=78 width=927) (actual time=0.116..0.116 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 254
7. 0.197 0.197 ↓ 0.0 0 1

Seq Scan on video video_4 (cost=0.00..66.40 rows=167 width=902) (actual time=0.197..0.197 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 520
8. 0.335 0.335 ↓ 0.0 0 1

Seq Scan on video video_5 (cost=0.00..119.08 rows=287 width=908) (actual time=0.335..0.335 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 904
9. 0.398 0.398 ↓ 0.0 0 1

Seq Scan on video video_6 (cost=0.00..130.68 rows=322 width=800) (actual time=0.398..0.398 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 1084
10. 0.105 0.105 ↓ 0.0 0 1

Seq Scan on video video_7 (cost=0.00..31.96 rows=61 width=779) (actual time=0.104..0.105 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 298
11. 0.059 0.059 ↓ 0.0 0 1

Seq Scan on video video_8 (cost=0.00..24.06 rows=34 width=783) (actual time=0.058..0.059 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 203
12. 0.047 0.047 ↓ 0.0 0 1

Seq Scan on video video_9 (cost=0.00..17.24 rows=30 width=721) (actual time=0.047..0.047 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 162
13. 0.012 0.012 ↓ 0.0 0 1

Index Scan using idx_2019_02_video_veiculo_inicio on video video_10 (cost=0.14..6.89 rows=1 width=612) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
14. 0.074 0.074 ↓ 0.0 0 1

Seq Scan on video video_11 (cost=0.00..27.08 rows=42 width=623) (actual time=0.074..0.074 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 304
15. 0.007 0.007 ↓ 0.0 0 1

Index Scan using idx_2019_04_video_veiculo_inicio on video video_12 (cost=0.14..8.17 rows=1 width=787) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
16. 0.005 0.005 ↓ 0.0 0 1

Index Scan using idx_2019_05_video_veiculo_inicio on video video_13 (cost=0.14..6.14 rows=1 width=859) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
17. 0.010 0.010 ↓ 0.0 0 1

Index Scan using idx_2019_06_video_veiculo_inicio on video video_14 (cost=0.27..8.30 rows=1 width=770) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
  • Rows Removed by Filter: 1
18. 0.017 0.028 ↓ 0.0 0 1

Bitmap Heap Scan on video video_15 (cost=4.45..40.68 rows=8 width=702) (actual time=0.028..0.028 rows=0 loops=1)

  • Recheck Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
  • Rows Removed by Filter: 23
  • Heap Blocks: exact=7
19. 0.011 0.011 ↑ 1.0 23 1

Bitmap Index Scan on idx_2019_07_video_veiculo_inicio (cost=0.00..4.45 rows=23 width=0) (actual time=0.010..0.011 rows=23 loops=1)

  • Index Cond: (veiculo_id = 51519)
20. 0.149 0.167 ↓ 0.0 0 1

Bitmap Heap Scan on video video_16 (cost=10.50..255.47 rows=97 width=527) (actual time=0.167..0.167 rows=0 loops=1)

  • Recheck Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
  • Rows Removed by Filter: 292
  • Heap Blocks: exact=60
21. 0.018 0.018 ↑ 1.0 292 1

Bitmap Index Scan on idx_2019_08_video_veiculo_inicio (cost=0.00..10.47 rows=292 width=0) (actual time=0.018..0.018 rows=292 loops=1)

  • Index Cond: (veiculo_id = 51519)
22. 0.004 0.004 ↓ 0.0 0 1

Index Scan using idx_2019_09_video_veiculo_inicio on video video_17 (cost=0.28..6.91 rows=1 width=928) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
23. 0.010 0.010 ↓ 0.0 0 1

Index Scan using idx_2019_10_video_veiculo_inicio on video video_18 (cost=0.28..8.18 rows=1 width=817) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
24. 0.003 0.006 ↓ 0.0 0 1

Bitmap Heap Scan on video video_19 (cost=4.29..10.89 rows=1 width=846) (actual time=0.006..0.006 rows=0 loops=1)

  • Recheck Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
  • Rows Removed by Filter: 2
  • Heap Blocks: exact=1
25. 0.003 0.003 ↑ 1.0 2 1

Bitmap Index Scan on idx_2019_11_video_veiculo_inicio (cost=0.00..4.29 rows=2 width=0) (actual time=0.003..0.003 rows=2 loops=1)

  • Index Cond: (veiculo_id = 51519)
26. 0.000 0.003 ↓ 0.0 0 1

Bitmap Heap Scan on video video_20 (cost=4.30..14.36 rows=1 width=731) (actual time=0.003..0.003 rows=0 loops=1)

  • Recheck Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
27. 0.003 0.003 ↓ 0.0 0 1

Bitmap Index Scan on idx_2019_12_video_veiculo_inicio (cost=0.00..4.30 rows=3 width=0) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
28. 0.003 0.003 ↓ 0.0 0 1

Index Scan using idx_2020_01_video_veiculo_inicio on video video_21 (cost=0.28..8.20 rows=1 width=841) (actual time=0.003..0.003 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
29. 0.002 0.002 ↓ 0.0 0 1

Index Scan using idx_2020_02_video_veiculo_inicio on video video_22 (cost=0.15..8.17 rows=1 width=272) (actual time=0.002..0.002 rows=0 loops=1)

  • Index Cond: (veiculo_id = 51519)
  • Filter: "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone)
30. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on video_fallback (cost=0.00..1.12 rows=1 width=272) (actual time=0.006..0.006 rows=0 loops=1)

  • Filter: ((veiculo_id = 51519) AND "overlaps"(inicio, fim, ('2018-06-20 18:15:00'::timestamp without time zone)::timestamp with time zone, ('2018-06-20 18:16:00'::timestamp without time zone)::timestamp with time zone))
  • Rows Removed by Filter: 6
Planning time : 1.815 ms
Execution time : 1.885 ms