explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hScf

Settings
# exclusive inclusive rows x rows loops node
1. 0.015 0.536 ↑ 1.0 1 1

Nested Loop (cost=1.13..249.94 rows=1 width=4) (actual time=0.025..0.536 rows=1 loops=1)

2. 0.409 0.409 ↓ 1.8 28 1

Index Scan using orders_application_user_id_index on orders (cost=0.56..205.10 rows=16 width=33) (actual time=0.016..0.409 rows=28 loops=1)

  • Index Cond: (application_user_id = 17259865)
  • Filter: ((created_at >= '2019-04-12 20:37:22.332972'::timestamp without time zone) OR (((state)::text = 'pending_review'::text) AND (created_at >= '2019-05-12 16:37:22.332972'::timestamp without time zone)))
  • Rows Removed by Filter: 498
3. 0.112 0.112 ↓ 0.0 0 28

Index Scan using orders_pkey on orders calculated_order (cost=0.56..2.79 rows=1 width=6) (actual time=0.004..0.004 rows=0 loops=28)

  • Index Cond: (order_id = orders.id)
  • Filter: (((orders.created_at >= '2019-04-12 20:37:22.332972'::timestamp without time zone) AND (is_active OR ((orders.state)::text = 'scheduled'::text)) AND (is_placed_now OR (orders.place_at IS NULL) OR (NOT is_placed_now) OR (orders.place_at IS NOT NULL))) OR (((orders.state)::text = 'pending_review'::text) AND (orders.created_at >= '2019-05-12 16:37:22.332972'::timestamp without time zone)))
  • Rows Removed by Filter: 1
Planning time : 2.024 ms
Execution time : 0.596 ms