explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JEre

Settings
# exclusive inclusive rows x rows loops node
1. 54.711 140,960.528 ↑ 1.0 1 1

Aggregate (cost=233,129.56..233,129.57 rows=1 width=32) (actual time=140,960.528..140,960.528 rows=1 loops=1)

2. 97.866 140,905.817 ↓ 1,781.9 64,149 1

Nested Loop Left Join (cost=2,358.17..233,129.46 rows=36 width=6) (actual time=52.253..140,905.817 rows=64,149 loops=1)

3. 81.650 72,553.415 ↓ 1,781.9 64,149 1

Hash Join (cost=2,357.61..232,850.46 rows=36 width=11) (actual time=1.239..72,553.415 rows=64,149 loops=1)

  • Hash Cond: ((f.id_vehicle + 0) = vs.id_vehicle)
4. 13.862 72,470.924 ↓ 1.0 64,149 1

Append (cost=0.56..230,182.24 rows=62,162 width=19) (actual time=0.382..72,470.924 rows=64,149 loops=1)

5. 72,457.062 72,457.062 ↓ 1.0 64,149 1

Index Scan using fact_monitoring_history_2020_09_1_date_id_vehicle_id_season_idx on fact_monitoring_history_2020_09_1d f (cost=0.56..229,871.43 rows=62,162 width=19) (actual time=0.380..72,457.062 rows=64,149 loops=1)

  • Index Cond: ((date >= '2020-09-05 03:00:00+00'::timestamp with time zone) AND (date <= '2020-09-06 02:59:59+00'::timestamp with time zone) AND (id_season = 127))
  • Filter: (id_activity > 0)
  • Rows Removed by Filter: 2,453
6. 0.026 0.841 ↓ 56.7 170 1

Hash (cost=2,357.01..2,357.01 rows=3 width=16) (actual time=0.841..0.841 rows=170 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
7. 0.155 0.815 ↓ 56.7 170 1

Nested Loop (cost=0.70..2,357.01 rows=3 width=16) (actual time=0.024..0.815 rows=170 loops=1)

8. 0.056 0.056 ↑ 1.0 302 1

Index Only Scan using uk_vehicle_season on vehicle_season vs (cost=0.29..13.57 rows=302 width=8) (actual time=0.016..0.056 rows=302 loops=1)

  • Index Cond: (id_season = 127)
  • Heap Fetches: 0
9. 0.604 0.604 ↑ 1.0 1 302

Index Scan using pk_vehicle on vehicle v (cost=0.41..7.76 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=302)

  • Index Cond: (id = vs.id_vehicle)
  • Filter: ((active IS TRUE) AND (id_company = 32) AND (id_agron_module = 3))
  • Rows Removed by Filter: 0
10. 64.149 68,254.536 ↑ 1.0 1 64,149

Append (cost=0.56..7.74 rows=1 width=11) (actual time=1.057..1.064 rows=1 loops=64,149)

11. 68,190.387 68,190.387 ↑ 1.0 1 64,149

Index Scan using pk_fact_mon_history_area_2020_09 on fact_mon_history_area_2020_09 monit_area (cost=0.56..7.74 rows=1 width=11) (actual time=1.057..1.063 rows=1 loops=64,149)

  • Index Cond: (id_monitoring = f.id)
  • Filter: ((date >= '2020-09-05 03:00:00+00'::timestamp with time zone) AND (date <= '2020-09-06 02:59:59+00'::timestamp with time zone))
Planning time : 12.485 ms
Execution time : 140,960.600 ms