explain.depesz.com

PostgreSQL's explain analyze made readable

Result: K12n : Optimization for: plan #T5mn

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 715.951 ↑ 65.8 10 1

Gather Merge (cost=208,354.20..208,430.97 rows=658 width=441) (actual time=700.725..715.951 rows=10 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.219 2,091.285 ↑ 109.7 3 3

Sort (cost=207,354.18..207,355.00 rows=329 width=441) (actual time=697.094..697.095 rows=3 loops=3)

  • Sort Key: rides.user_id, rides.created_at
  • Sort Method: quicksort Memory: 26kB
  • Worker 0: Sort Method: quicksort Memory: 26kB
  • Worker 1: Sort Method: quicksort Memory: 27kB
3. 0.000 2,091.066 ↑ 109.7 3 3

Nested Loop (cost=0.56..207,340.42 rows=329 width=441) (actual time=523.820..697.022 rows=3 loops=3)

4. 1,637.955 1,637.955 ↓ 3.7 12,665 3

Parallel Seq Scan on requested_points (cost=0.00..180,946.80 rows=3,378 width=66) (actual time=514.242..545.985 rows=12,665 loops=3)

  • Filter: ((("time" >= '2019-10-31 15:00:00'::timestamp without time zone) AND ("time" <= '2019-11-25 23:59:59'::timestamp without time zone)) OR ((time_max >= '2019-10-31 15:00:00'::timestamp without time zone) AND (time_max <= '2019-11
  • Rows Removed by Filter: 1578731
5. 455.952 455.952 ↓ 0.0 0 37,996

Index Scan using rides_pkey on rides (cost=0.56..7.81 rows=1 width=377) (actual time=0.012..0.012 rows=0 loops=37,996)

  • Index Cond: ((id)::text = (requested_points.ride_id)::text)
  • Filter: ((product_id)::text = 'prd_58f68f15-b80d-4e3c-8141-104beec82317'::text)
  • Rows Removed by Filter: 1
Planning time : 0.525 ms
Execution time : 716.026 ms