explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5iXw

Settings
# exclusive inclusive rows x rows loops node
1. 658.841 9,735.905 ↓ 0.0 0 1

Update on calculations_gps (cost=49.63..11,567.63 rows=10,000 width=91) (actual time=9,735.905..9,735.905 rows=0 loops=1)

2.          

CTE cte

3. 2.240 8.626 ↓ 200.0 10,000 1

WindowAgg (cost=48.75..49.63 rows=50 width=20) (actual time=5.782..8.626 rows=10,000 loops=1)

4. 2.389 6.386 ↓ 200.0 10,000 1

Sort (cost=48.75..48.88 rows=50 width=12) (actual time=5.776..6.386 rows=10,000 loops=1)

  • Sort Key: calculations_gps_1.location_date
  • Sort Method: quicksort Memory: 853kB
5. 1.285 3.997 ↓ 200.0 10,000 1

Bitmap Heap Scan on calculations_gps calculations_gps_1 (cost=1.77..47.34 rows=50 width=12) (actual time=2.735..3.997 rows=10,000 loops=1)

  • Recheck Cond: (traccar_session_id = 979242)
  • Heap Blocks: exact=143
6. 2.712 2.712 ↓ 200.0 10,000 1

Bitmap Index Scan on calculations_gps_traccar_session_id_idx (cost=0.00..1.76 rows=50 width=0) (actual time=2.712..2.712 rows=10,000 loops=1)

  • Index Cond: (traccar_session_id = 979242)
7. 17.064 9,077.064 ↑ 1.0 10,000 1

Seq Scan on calculations_gps (cost=0.00..11,518.00 rows=10,000 width=91) (actual time=11.353..9,077.064 rows=10,000 loops=1)

8.          

SubPlan (forSeq Scan)

9. 9,060.000 9,060.000 ↑ 1.0 1 10,000

CTE Scan on cte (cost=0.00..1.13 rows=1 width=8) (actual time=0.460..0.906 rows=1 loops=10,000)

  • Filter: (id = calculations_gps.id)
  • Rows Removed by Filter: 9999