explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iOFvg

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 47,499.157 ↓ 0.0 0 1

Limit (cost=0.70..2,627.39 rows=1 width=28) (actual time=47,499.156..47,499.157 rows=0 loops=1)

2. 0.027 47,499.153 ↓ 0.0 0 1

Merge Append (cost=0.70..830,033.65 rows=316 width=28) (actual time=47,499.152..47,499.153 rows=0 loops=1)

  • Sort Key: ag_event.unixtimestamp DESC
3. 0.076 0.076 ↓ 0.0 0 1

Index Scan Backward using ag_event_unixtimestamp_idx on ag_event (cost=0.12..8.15 rows=1 width=28) (actual time=0.076..0.076 rows=0 loops=1)

  • Index Cond: ((unixtimestamp < 1580373579) AND (unixtimestamp > 1580366379))
  • Filter: ((latitude IS NOT NULL) AND (latitude <> '0'::double precision) AND (agentid = 82556))
4. 47,499.050 47,499.050 ↓ 0.0 0 1

Index Scan Backward using ag_event_2020_01_30_ts on ag_event_2020_01_30 (cost=0.56..830,021.54 rows=315 width=28) (actual time=47,499.049..47,499.050 rows=0 loops=1)

  • Index Cond: ((unixtimestamp < 1580373579) AND (unixtimestamp > 1580366379))
  • Filter: ((latitude IS NOT NULL) AND (latitude <> '0'::double precision) AND (agentid = 82556))
  • Rows Removed by Filter: 4802707
Planning time : 60.963 ms
Execution time : 47,515.439 ms