explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3ciH

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 278.522 1,223,823.582 ↑ 2.5 430,914 1

WindowAgg (cost=5,346,439.47..5,380,860.61 rows=1,059,112 width=255) (actual time=1,223,446.789..1,223,823.582 rows=430,914 loops=1)

2. 938.860 1,223,545.060 ↑ 2.5 430,914 1

Sort (cost=5,346,439.47..5,349,087.25 rows=1,059,112 width=223) (actual time=1,223,438.125..1,223,545.060 rows=430,914 loops=1)

  • Sort Key: mmsi, ((date_trunc('hour'::text, GREATEST(last_known_position_timestamp, predicted_position_timestamp)) + '01:00:00'::interval)), (GREATEST(last_know
  • Sort Method: external merge Disk: 89592kB
3. 1,222,606.200 1,222,606.200 ↑ 2.5 430,914 1

Index Scan using vessel_table_mmsi_idx on vessel_table (cost=0.57..5,160,294.38 rows=1,059,112 width=223) (actual time=0.273..1,222,606.200 rows=430,914 loops=1)

  • Index Cond: (mmsi = ANY ('{9113883,53800514,205461000,205519000,207834350,209407000,209856000,210602000,210872000,211164850,211266470,211282560,212172000
  • Filter: ((date_trunc('hour'::text, GREATEST(last_known_position_timestamp, predicted_position_timestamp)) + '01:00:00'::interval) > (timezone('UTC'::text
  • Rows Removed by Filter: 2267877
Planning time : 5.858 ms
Execution time : 1,223,882.462 ms