explain.depesz.com

PostgreSQL's explain analyze made readable

Result: F0jy

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 4,493.633 ↓ 0.0 0 1

Limit (cost=213,267.84..213,268.03 rows=77 width=202) (actual time=4,493.633..4,493.633 rows=0 loops=1)

  • Buffers: shared hit=86135 read=3380
2. 0.028 4,493.631 ↓ 0.0 0 1

Sort (cost=213,267.84..213,268.03 rows=77 width=202) (actual time=4,493.631..4,493.631 rows=0 loops=1)

  • Sort Key: order0_.dateordered DESC, order0_.documentno DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=86135 read=3380
3. 0.001 4,493.603 ↓ 0.0 0 1

Nested Loop (cost=10,330.54..213,265.43 rows=77 width=202) (actual time=4,493.603..4,493.603 rows=0 loops=1)

  • Buffers: shared hit=86129 read=3380
4. 0.001 4,493.602 ↓ 0.0 0 1

Nested Loop (cost=10,329.98..30,911.41 rows=77 width=163) (actual time=4,493.602..4,493.602 rows=0 loops=1)

  • Buffers: shared hit=86129 read=3380
5. 0.000 4,493.601 ↓ 0.0 0 1

Nested Loop (cost=10,329.70..30,515.73 rows=77 width=158) (actual time=4,493.601..4,493.601 rows=0 loops=1)

  • Buffers: shared hit=86129 read=3380
6. 0.035 4,493.601 ↓ 0.0 0 1

Bitmap Heap Scan on c_order order0_ (cost=10,329.14..29,854.49 rows=77 width=142) (actual time=4,493.601..4,493.601 rows=0 loops=1)

  • Recheck Cond: (upper((documentno)::text) ~~ '%214.101/002693%'::text)
  • Rows Removed by Index Recheck: 1
  • Filter: ((em_obpos_applications_id IS NOT NULL) AND ((docstatus)::text <> 'CJ'::text) AND ((docstatus)::text <> 'CA'::text) AND ((ad_client_id)::text = '9404134F8B374DEE92E79CD87B834E19'::text) AND ((ad_org_id)::text = 'C459182BF30B46FEAF1C91DE123CDB99'::text) AND (em_obpos_isdeleted = 'N'::bpchar) AND (((docstatus)::text <> 'CL'::text) OR (iscancelled = 'Y'::bpchar)))
  • Heap Blocks: exact=1
  • Buffers: shared hit=86129 read=3380
7. 4,493.566 4,493.566 ↑ 4,949.0 1 1

Bitmap Index Scan on em_obpos_order_docno_trgm (cost=0.00..10,329.12 rows=4,949 width=0) (actual time=4,493.566..4,493.566 rows=1 loops=1)

  • Index Cond: (upper((documentno)::text) ~~ '%214.101/002693%'::text)
  • Buffers: shared hit=86129 read=3379
8. 0.000 0.000 ↓ 0.0 0

Index Scan using c_bpartner_key on c_bpartner businesspa1_ (cost=0.56..8.58 rows=1 width=49) (never executed)

  • Index Cond: ((c_bpartner_id)::text = (order0_.c_bpartner_id)::text)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using c_doctype_key on c_doctype documentty2_ (cost=0.28..5.13 rows=1 width=37) (never executed)

  • Index Cond: ((c_doctype_id)::text = (order0_.c_doctype_id)::text)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using c_order_key on c_order order_comp4_ (cost=0.56..8.58 rows=1 width=39) (never executed)

  • Index Cond: ((c_order_id)::text = (order0_.c_order_id)::text)
11.          

SubPlan (forNested Loop)

12. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=1,388.86..1,388.88 rows=1 width=8) (never executed)

13. 0.000 0.000 ↓ 0.0 0

Index Scan using c_orderline_order on c_orderline ol (cost=0.57..1,383.73 rows=341 width=8) (never executed)

  • Index Cond: ((c_order_id)::text = (order_comp4_.c_order_id)::text)
  • Filter: (c_order_discount_id IS NULL)
14. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=486.13..486.14 rows=1 width=6) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=2.26..486.12 rows=1 width=6) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.69..485.10 rows=1 width=39) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..484.33 rows=1 width=39) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fps (cost=0.56..8.58 rows=1 width=33) (never executed)

  • Index Cond: ((c_order_id)::text = (order_comp4_.c_order_id)::text)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fpsd (cost=0.56..474.59 rows=116 width=72) (never executed)

  • Index Cond: ((fin_payment_schedule_order)::text = (fps.fin_payment_schedule_id)::text)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_payment_detail_key on fin_payment_detail fpd (cost=0.56..0.76 rows=1 width=66) (never executed)

  • Index Cond: ((fin_payment_detail_id)::text = (fpsd.fin_payment_detail_id)::text)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_payment_key on fin_payment fp (cost=0.56..1.01 rows=1 width=33) (never executed)

  • Index Cond: ((fin_payment_id)::text = (fpd.fin_payment_id)::text)
  • Filter: ((status)::text <> ALL ('{RPVOID,RPAP}'::text[]))
22. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=484.60..484.61 rows=1 width=6) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.13..484.59 rows=1 width=6) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fin_paymen7_ (cost=0.56..8.58 rows=1 width=33) (never executed)

  • Index Cond: ((c_order_id)::text = (order0_.c_order_id)::text)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fin_paymen6_ (cost=0.56..474.88 rows=113 width=39) (never executed)

  • Index Cond: ((fin_payment_schedule_order)::text = (fin_paymen7_.fin_payment_schedule_id)::text)
  • Filter: ((fin_payment_detail_id IS NOT NULL) AND (iscanceled = 'N'::bpchar))
Planning time : 18.324 ms
Execution time : 4,494.967 ms