explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Aq1V

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 35.482 ↓ 0.0 0 1

Limit (cost=4,087.48..4,087.49 rows=1 width=253) (actual time=35.482..35.482 rows=0 loops=1)

2. 0.005 35.481 ↓ 0.0 0 1

Sort (cost=4,087.48..4,087.49 rows=1 width=253) (actual time=35.481..35.481 rows=0 loops=1)

  • Sort Key: order0_.created_date DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.002 35.476 ↓ 0.0 0 1

Nested Loop (cost=1.27..4,087.47 rows=1 width=253) (actual time=35.476..35.476 rows=0 loops=1)

4. 0.097 35.474 ↓ 0.0 0 1

Nested Loop (cost=1.27..4,085.86 rows=1 width=261) (actual time=35.474..35.474 rows=0 loops=1)

5. 31.053 31.053 ↓ 1.6 1,081 1

Index Scan using order_delivery_order_state_created_date_idx on order_delivery order0_ (cost=0.70..1,012.74 rows=657 width=253) (actual time=0.025..31.053 rows=1,081 loops=1)

  • Index Cond: (((order_state)::text = ANY ('{ALLOCATION_FAILED,ALLOCATING,DELIVERY_ACCEPTED,PENDING,CONFIRMED}'::text[])) AND (created_date >= '2020-09-08 02:00:00'::timestamp without time zone) AND (created_date <= '2020-09-09 01:59:05'::timestamp without time zone))
6. 4.324 4.324 ↓ 0.0 0 1,081

Index Scan using pk_locality on locality origin1_ (cost=0.57..4.68 rows=1 width=16) (actual time=0.004..0.004 rows=0 loops=1,081)

  • Index Cond: (id = order0_.origin_id)
  • Filter: (country_id = 2)
  • Rows Removed by Filter: 1
7. 0.000 0.000 ↓ 0.0 0

Seq Scan on country c (cost=0.00..1.51 rows=1 width=8) (never executed)

  • Filter: (id = 2)
Planning time : 0.607 ms
Execution time : 35.534 ms