explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RsFp : Optimization for: plan #DRJU

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.450 23,097.493 ↓ 10.8 129 1

Unique (cost=0.29..5,807,087.62 rows=12 width=8) (actual time=172.046..23,097.493 rows=129 loops=1)

2. 2,908.615 23,097.043 ↑ 27.7 6,732 1

Nested Loop (cost=0.29..5,806,621.69 rows=186,372 width=8) (actual time=172.045..23,097.043 rows=6,732 loops=1)

  • Join Filter: (SubPlan 1)
  • Rows Removed by Join Filter: 4000266
3. 15.150 15.150 ↓ 10.8 129 1

Index Scan using realtime_weather_event_pkey on realtime_weather_event e (cost=0.29..3,066.20 rows=12 width=8) (actual time=14.662..15.150 rows=129 loops=1)

  • Filter: ((expires > '2019-11-26 15:28:36+00'::timestamp with time zone) AND ((event)::text = ANY ('{"Ice Storm Warning","Blizzard Warning","Winter Storm Warning","Tropical Storm Watch","Tropical Storm Warning","Hurricane Watch","Hurricane Warning"}'::text[])))
  • Rows Removed by Filter: 50531
4. 131.439 138.288 ↑ 1.0 31,062 129

Materialize (cost=0.00..940.93 rows=31,062 width=6) (actual time=0.000..1.072 rows=31,062 loops=129)

5. 6.849 6.849 ↑ 1.0 31,062 1

Seq Scan on uszips z (cost=0.00..785.62 rows=31,062 width=6) (actual time=0.019..6.849 rows=31,062 loops=1)

6.          

SubPlan (for Nested Loop)

7. 0.000 20,034.990 ↑ 200.0 5 4,006,998

Result (cost=0.29..28.31 rows=1,000 width=32) (actual time=0.004..0.005 rows=5 loops=4,006,998)

8. 16,027.992 20,034.990 ↑ 200.0 5 4,006,998

ProjectSet (cost=0.29..13.31 rows=1,000 width=32) (actual time=0.004..0.005 rows=5 loops=4,006,998)

9. 4,006.998 4,006.998 ↑ 1.0 1 4,006,998

Index Scan using realtime_weather_event_pkey on realtime_weather_event (cost=0.29..8.31 rows=1 width=21) (actual time=0.001..0.001 rows=1 loops=4,006,998)

  • Index Cond: (event_id = e.event_id)
Planning time : 0.676 ms