explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ew3h

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 175.786 ↑ 26.0 1 1

Limit (cost=8,359.42..17,994.06 rows=26 width=396) (actual time=175.785..175.786 rows=1 loops=1)

  • Buffers: shared hit=8,570 read=1,275
2. 0.013 175.784 ↑ 26.0 1 1

Result (cost=8,359.42..17,994.06 rows=26 width=396) (actual time=175.783..175.784 rows=1 loops=1)

  • Buffers: shared hit=8,570 read=1,275
3. 0.036 172.316 ↑ 26.0 1 1

Sort (cost=8,359.42..8,359.49 rows=26 width=339) (actual time=172.315..172.316 rows=1 loops=1)

  • Sort Key: order0_.dateordered DESC, order0_.documentno DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=8,554 read=1,266
4. 0.005 172.280 ↑ 26.0 1 1

Nested Loop (cost=501.16..8,358.81 rows=26 width=339) (actual time=172.264..172.280 rows=1 loops=1)

  • Buffers: shared hit=8,548 read=1,266
5. 0.002 172.259 ↑ 26.0 1 1

Nested Loop (cost=500.88..8,302.48 rows=26 width=281) (actual time=172.244..172.259 rows=1 loops=1)

  • Buffers: shared hit=8,545 read=1,266
6. 0.004 172.238 ↑ 26.0 1 1

Nested Loop (cost=500.60..8,239.62 rows=26 width=281) (actual time=172.223..172.238 rows=1 loops=1)

  • Buffers: shared hit=8,542 read=1,266
7. 0.024 0.024 ↑ 1.0 1 1

Index Scan using ad_org_key on ad_org organizati6_ (cost=0.28..2.49 rows=1 width=50) (actual time=0.022..0.024 rows=1 loops=1)

  • Index Cond: ((ad_org_id)::text = 'F4ABF4C86BA34D33B97C213EEA42755E'::text)
  • Buffers: shared hit=3
8. 0.003 172.210 ↑ 26.0 1 1

Nested Loop (cost=500.32..8,236.86 rows=26 width=263) (actual time=172.197..172.210 rows=1 loops=1)

  • Buffers: shared hit=8,539 read=1,266
9. 0.007 172.158 ↑ 26.0 1 1

Nested Loop (cost=499.76..8,164.58 rows=26 width=248) (actual time=172.145..172.158 rows=1 loops=1)

  • Buffers: shared hit=8,534 read=1,266
10. 26.219 171.227 ↑ 26.0 1 1

Bitmap Heap Scan on c_order order0_ (cost=499.19..8,092.17 rows=26 width=209) (actual time=171.215..171.227 rows=1 loops=1)

  • Recheck Cond: (upper((documentno)::text) ~~ '%0002952%'::text)
  • Filter: ((em_obpos_applications_id IS NOT NULL) AND ((ad_org_id)::text = 'F4ABF4C86BA34D33B97C213EEA42755E'::text) AND ((ad_client_id)::text = '9404134F8B374DEE92E79CD87B834E19'::text) AND (em_obpos_isdeleted = 'N'::bpchar) AND (((docstatus)::text <> 'CL'::text) OR (iscancelled = 'Y'::bpchar)) AND ((docstatus)::text <> ALL ('{CJ,CA,NC,AE,ME}'::text[])))
  • Rows Removed by Filter: 1,292
  • Heap Blocks: exact=1,289
  • Buffers: shared hit=8,531 read=1,264
11. 145.008 145.008 ↑ 5.2 1,297 1

Bitmap Index Scan on em_obpos_order_docno_trgm (cost=0.00..499.18 rows=6,718 width=0) (actual time=145.008..145.008 rows=1,297 loops=1)

  • Index Cond: (upper((documentno)::text) ~~ '%0002952%'::text)
  • Buffers: shared hit=8,389 read=117
12. 0.924 0.924 ↑ 1.0 1 1

Index Scan using c_order_key on c_order order_comp1_ (cost=0.57..2.79 rows=1 width=39) (actual time=0.924..0.924 rows=1 loops=1)

  • Index Cond: ((c_order_id)::text = (order0_.c_order_id)::text)
  • Buffers: shared hit=3 read=2
13. 0.049 0.049 ↑ 1.0 1 1

Index Scan using c_bpartner_key on c_bpartner businesspa5_ (cost=0.56..2.78 rows=1 width=48) (actual time=0.049..0.049 rows=1 loops=1)

  • Index Cond: ((c_bpartner_id)::text = (order0_.c_bpartner_id)::text)
  • Buffers: shared hit=5
14. 0.019 0.019 ↑ 1.0 1 1

Index Scan using obpos_app_pk on obpos_applications obpos_appl7_ (cost=0.29..2.42 rows=1 width=66) (actual time=0.019..0.019 rows=1 loops=1)

  • Index Cond: ((obpos_applications_id)::text = (order0_.em_obpos_applications_id)::text)
  • Buffers: shared hit=3
15. 0.016 0.016 ↑ 1.0 1 1

Index Scan using c_doctype_key on c_doctype documentty8_ (cost=0.28..2.16 rows=1 width=37) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: ((c_doctype_id)::text = (order0_.c_doctype_id)::text)
  • Buffers: shared hit=3
16.          

SubPlan (for Result)

17. 0.009 1.159 ↑ 1.0 1 1

Aggregate (cost=334.86..334.88 rows=1 width=32) (actual time=1.159..1.159 rows=1 loops=1)

  • Buffers: shared hit=2 read=3
18. 1.150 1.150 ↑ 293.0 1 1

Index Scan using c_orderline_order2 on c_orderline ol (cost=0.57..330.46 rows=293 width=8) (actual time=1.149..1.150 rows=1 loops=1)

  • Index Cond: ((c_order_id)::text = (order_comp1_.c_order_id)::text)
  • Filter: (c_order_discount_id IS NULL)
  • Buffers: shared hit=2 read=3
19. 0.006 2.279 ↑ 1.0 1 1

Aggregate (cost=19.88..19.90 rows=1 width=32) (actual time=2.279..2.279 rows=1 loops=1)

  • Buffers: shared hit=4 read=6
20. 0.001 2.273 ↓ 0.0 0 1

Nested Loop (cost=2.27..19.88 rows=1 width=6) (actual time=2.273..2.273 rows=0 loops=1)

  • Buffers: shared hit=4 read=6
21. 0.002 2.272 ↓ 0.0 0 1

Nested Loop (cost=1.70..17.80 rows=1 width=39) (actual time=2.272..2.272 rows=0 loops=1)

  • Buffers: shared hit=4 read=6
22. 0.003 2.269 ↑ 1.0 1 1

Nested Loop (cost=1.13..15.72 rows=1 width=39) (actual time=2.269..2.269 rows=1 loops=1)

  • Buffers: shared hit=4 read=6
23. 1.042 1.042 ↑ 1.0 1 1

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fps (cost=0.56..2.78 rows=1 width=33) (actual time=1.042..1.042 rows=1 loops=1)

  • Index Cond: ((c_order_id)::text = (order_comp1_.c_order_id)::text)
  • Buffers: shared hit=2 read=3
24. 1.224 1.224 ↑ 10.0 1 1

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fpsd (cost=0.57..12.84 rows=10 width=72) (actual time=1.224..1.224 rows=1 loops=1)

  • Index Cond: ((fin_payment_schedule_order)::text = (fps.fin_payment_schedule_id)::text)
  • Buffers: shared hit=2 read=3
25. 0.001 0.001 ↓ 0.0 0 1

Index Scan using fin_payment_detail_key on fin_payment_detail fpd (cost=0.57..2.07 rows=1 width=66) (actual time=0.001..0.001 rows=0 loops=1)

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

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

  • Index Cond: ((fin_payment_id)::text = (fpd.fin_payment_id)::text)
  • Filter: ((status)::text <> ALL ('{RPVOID,RPAP}'::text[]))
27. 0.001 0.017 ↑ 1.0 1 1

Aggregate (cost=15.74..15.76 rows=1 width=32) (actual time=0.017..0.017 rows=1 loops=1)

  • Buffers: shared hit=10
28. 0.003 0.016 ↓ 0.0 0 1

Nested Loop (cost=1.13..15.74 rows=1 width=6) (actual time=0.016..0.016 rows=0 loops=1)

  • Buffers: shared hit=10
29. 0.006 0.006 ↑ 1.0 1 1

Index Scan using fin_paym_sch_ord_idx on fin_payment_schedule fin_paymen4_ (cost=0.56..2.78 rows=1 width=33) (actual time=0.006..0.006 rows=1 loops=1)

  • Index Cond: ((c_order_id)::text = (order0_.c_order_id)::text)
  • Buffers: shared hit=5
30. 0.007 0.007 ↓ 0.0 0 1

Index Scan using fin_pay_scheduledetail_or on fin_payment_scheduledetail fin_paymen3_ (cost=0.57..12.87 rows=9 width=39) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((fin_payment_schedule_order)::text = (fin_paymen4_.fin_payment_schedule_id)::text)
  • Filter: ((fin_payment_detail_id IS NOT NULL) AND (iscanceled = 'N'::bpchar))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=5
Planning time : 11.401 ms
Execution time : 176.280 ms