explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xte

Settings
# exclusive inclusive rows x rows loops node
1. 0.398 17,973.293 ↓ 6.7 301 1

Limit (cost=9,566.08..9,566.19 rows=45 width=227) (actual time=17,972.694..17,973.293 rows=301 loops=1)

2. 23.285 17,972.895 ↓ 6.7 301 1

Sort (cost=9,566.08..9,566.19 rows=45 width=227) (actual time=17,972.692..17,972.895 rows=301 loops=1)

  • Sort Key: order0_.dateordered DESC, order0_.documentno DESC
  • Sort Method: top-N heapsort Memory: 153kB
3. 18.493 17,949.610 ↓ 139.9 6,296 1

Nested Loop (cost=694.27..9,564.85 rows=45 width=227) (actual time=429.190..17,949.610 rows=6,296 loops=1)

4. 20.398 17,905.933 ↓ 139.9 6,296 1

Nested Loop (cost=693.99..9,476.32 rows=45 width=169) (actual time=429.161..17,905.933 rows=6,296 loops=1)

5. 17,489.876 17,860.351 ↓ 139.9 6,296 1

Bitmap Heap Scan on c_order order0_ (cost=693.72..9,431.37 rows=45 width=142) (actual time=429.112..17,860.351 rows=6,296 loops=1)

  • Recheck Cond: (upper((documentno)::text) ~~ '%205%'::text)
  • Rows Removed by Index Recheck: 13299518
  • Filter: ((em_obpos_applications_id IS NOT NULL) AND ((docstatus)::text <> 'CJ'::text) AND ((docstatus)::text <> 'CA'::text) AND (em_obpos_islayaway <> 'Y'::bpchar) AND ((ad_client_id)::text = 'E458618056C24D0088568C7F4E7AABD5'::text) AND ((ad_org_id)::text = 'F12573C4279D4225973A7EE7D5EFF60B'::text) AND (em_obpos_isdeleted = 'N'::bpchar) AND (((docstatus)::text <> 'CL'::text) OR (iscancelled = 'Y'::bpchar)))
  • Rows Removed by Filter: 2046100
  • Heap Blocks: exact=38141 lossy=1794383
6. 370.475 370.475 ↓ 272.5 2,103,711 1

Bitmap Index Scan on em_obpos_order_docno_trgm (cost=0.00..693.71 rows=7,721 width=0) (actual time=370.474..370.475 rows=2,103,711 loops=1)

  • Index Cond: (upper((documentno)::text) ~~ '%205%'::text)
7. 25.184 25.184 ↑ 1.0 1 6,296

Index Scan using c_bpartner_key on c_bpartner businesspa1_ (cost=0.27..1.00 rows=1 width=60) (actual time=0.004..0.004 rows=1 loops=6,296)

  • Index Cond: ((c_bpartner_id)::text = (order0_.c_bpartner_id)::text)
8. 25.184 25.184 ↑ 1.0 1 6,296

Index Scan using c_doctype_key on c_doctype documentty2_ (cost=0.28..1.96 rows=1 width=37) (actual time=0.004..0.004 rows=1 loops=6,296)

  • Index Cond: ((c_doctype_id)::text = (order0_.c_doctype_id)::text)
Planning time : 5.219 ms
Execution time : 17,974.546 ms