explain.depesz.com

PostgreSQL's explain analyze made readable

Result: I0YH

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Aggregate (cost=359,956.42..359,956.43 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=168,894.67..359,956.36 rows=21 width=0) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Hash Join (cost=168,894.10..359,524.21 rows=158 width=4) (actual rows= loops=)

  • Hash Cond: (oms_restaurantdetails.id = oms_order.restaurant_details_id)
4. 0.000 0.000 ↓ 0.0

Index Scan using oms_restaurantdetails_d266de13 on oms_restaurantdetails (cost=0.57..188,072.04 rows=172,853 width=4) (actual rows= loops=)

  • Index Cond: (area_id = 253)
5. 0.000 0.000 ↓ 0.0

Hash (cost=166,556.48..166,556.48 rows=142,404 width=8) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Scan using ordered_time_desc_idx on oms_order (cost=0.57..166,556.48 rows=142,404 width=8) (actual rows= loops=)

  • Index Cond: (ordered_time >= '2018-12-02 05:18:06.080237+00'::timestamp with time zone)
  • Filter: (((payment_txn_status)::text <> ALL ('{failed,pending}'::text[])) OR (payment_txn_status IS NULL))
7. 0.000 0.000 ↓ 0.0

Index Scan using oms_orderstatus_pkey on oms_orderstatus (cost=0.57..2.73 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id = oms_order.status_id)
  • Filter: ((order_status)::text <> ALL ('{delivered,cancelled}'::text[]))