explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sJAt

Settings
# exclusive inclusive rows x rows loops node
1. 1.320 2,668.176 ↑ 137.8 280 1

GroupAggregate (cost=101,125.79..118,292.53 rows=38,577 width=96) (actual time=2,403.496..2,668.176 rows=280 loops=1)

  • Group Key: x.lat, x.lng
2. 18.620 2,666.856 ↑ 95.0 1,378 1

Subquery Scan on x (cost=101,125.79..116,828.87 rows=130,859 width=95) (actual time=2,403.329..2,666.856 rows=1,378 loops=1)

  • Filter: (x.r <= 5)
  • Rows Removed by Filter: 391693
3. 212.434 2,648.236 ↓ 1.0 393,071 1

WindowAgg (cost=101,125.79..111,921.66 rows=392,577 width=103) (actual time=2,403.327..2,648.236 rows=393,071 loops=1)

4. 2,235.822 2,435.802 ↓ 1.0 393,071 1

Sort (cost=101,125.79..102,107.24 rows=392,577 width=95) (actual time=2,403.312..2,435.802 rows=393,071 loops=1)

  • Sort Key: (round(product_location_124.latitude, 0)), (round(product_location_124.longitude, 0)), product_location_124.product
  • Sort Method: quicksort Memory: 49292kB
5. 199.980 199.980 ↓ 1.0 393,071 1

Index Scan using idx_product_location_124_date on product_location_124 (cost=0.43..64,650.26 rows=392,577 width=95) (actual time=0.034..199.980 rows=393,071 loops=1)

  • Index Cond: (date > (now() - '1 mon'::interval))
Planning time : 0.155 ms