explain.depesz.com

PostgreSQL's explain analyze made readable

Result: N1b5

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

Nested Loop Left Join (cost=9.81..22.19 rows=1 width=316) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on order_details od (cost=9.52..19.88 rows=1 width=300) (actual rows= loops=)

  • Recheck Cond: ((vendor_id = 21019) AND (order_header_id = ANY ('{299973,303476,305730,301593,307223,307224}'::integer[])))
  • Filter: ((deleted_by IS NULL) AND (deleted_on IS NULL) AND (NOT (SubPlan 1)))
3. 0.000 0.000 ↓ 0.0

BitmapAnd (cost=9.52..9.52 rows=1 width=0) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_order_details_vendor_id (cost=0.00..1.42 rows=17 width=0) (actual rows= loops=)

  • Index Cond: (vendor_id = 21019)
5. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on idx_order_details_order_header_id (cost=0.00..7.84 rows=10 width=0) (actual rows= loops=)

  • Index Cond: (order_header_id = ANY ('{299973,303476,305730,301593,307223,307224}'::integer[]))
6.          

SubPlan (for Bitmap Heap Scan)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.58..18.10 rows=1 width=4) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Index Scan using idx_order_details_vendor_id on order_details subod (cost=0.29..15.76 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (vendor_id = 21019)
  • Filter: ((deleted_by IS NULL) AND (order_detail_id IS NOT NULL) AND (order_detail_id = od.id))
9. 0.000 0.000 ↓ 0.0

Index Scan using pk_order_headers on order_headers suboh (cost=0.29..2.33 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id = subod.order_header_id)
  • Filter: ((deleted_by IS NULL) AND ((ap_financial_status_type_id IS NULL) OR (ap_financial_status_type_id <> 5)) AND (ap_header_type_id = 5) AND (vendor_id = 21019) AND (subod.cid = cid) AND (id <> ALL ('{299974,303477,303479,305731,301594,307225,307226,307228,307227}'::integer[])))
10. 0.000 0.000 ↓ 0.0

Index Scan using pk_buyer_locations on buyer_locations bl (cost=0.29..2.31 rows=1 width=20) (actual rows= loops=)