본문 바로가기

PowerBuilder

Powerbuilder datawindow is very slow

728x90

Version : Powerbuilder 12.6

 

증상 : Symtom --------------------------------------------------------------------

아래의 복잡한 Query로 동일 문장을 ISQL에서 실행하는데 전혀 문제가 없음(빠름)

하지만 이걸 datawindow로 만들면 상당히 느려짐

 

Query 5초이내, dw 30~60초 이상

 

No problem to use a below complex query in ISQL session in database screen.

However, when same query is developled in datawindow, the retrieve performance is verrrrrrrrrrrrrrry pooooooooooor.

 

Query is so fast(within < 5sec) but dw is not fast (30sec ~ 60sec ~).

 

******Sample complex query

FROM TOPCHG A, DPOS B, ITEM C, SITE D, ITEMfac e, ITEM f, ITEMfac g, Tdate h, PO M, VEND V,usermast P, 
POpart pi, PO ph, VEND m2, usermast p2,
PO bph, VEND bm2, usermast bp2,
(select bpi.top1_code top1_code,  bpi.item item, '3' company, 1 code, 'H' history, max(bpi.order) order_before2
from TOPchangepc aa,POpart bpi
where aa.top1_code = bpi.top1_code and
aa.b_ITEM = bpi.item and
trunc(aa.change_date) > bpi.change_date and
bpi.company = '113' and
aa.change_date BETWEEN to_date(:asfrom, 'yyyy/mm/dd') AND to_date(:asto, 'yyyy/mm/dd') 
group by bpi.top1_code, bpi.item ) bpo
WHERE A.top1_CODE = B.top1_CODE(+) AND
A.A_ITEM   = C.item(+) AND
A.B_ITEM   = F.item(+) AND
A.top1_CODE = D.site(+) AND
G.kind(+) = '99' AND
A.B_ITEM   = G.item(+) AND
A.A_ITEM   = E.item(+) AND
A.top1_CODE = H.top1_CODE(+) AND
A.sub2_CODE = H.sub2_CODE(+) AND
m.company(+) = '113' AND
A.order = m.order(+) AND
m.vendor = v.vendor(+) AND
v.company(+) = '113' AND
m.representative = p.employee(+) AND
a.top1_code = pi.top1_code(+) and
a.a_ITEM = pi.item(+) and
trunc(a.change_date) <= pi.change_date(+) and
pi.company = ph.company(+) and
pi.order = ph.order(+) and
pi.code = ph.code(+) and
m2.company(+) = '113' and
ph.vendor = m2.vendor(+) and
ph.representative = p2.employee(+) and
a.top1_code = bpo.top1_code(+) and
a.b_ITEM = bpo.item(+) and
bpo.company = bph.company(+) and
bpo.order_before2 = bph.order(+) and
bpo.code = bph.code(+) and
bm2.company(+) = '113' and
bph.vendor = bm2.vendor(+) and
bph.representative = bp2.employee(+) and
A.change_date BETWEEN to_date(:asfrom, 'yyyy/mm/dd') AND to_date(:asto, 'yyyy/mm/dd')

 

 

방안 Solution ------------------------------------------------------------------------

임시로 찾은 방법

datawindow를 열어서 data source로 들어가서(syntax모드)

마지막 라인이 문장으로 끝나 있으면 엔터를 쳐서

빈라인을 만들어서 저장해서 조회해보니

저의 경우는 속도가 엄청나게 빨라짐.

 

모든 경우게 맞는건 아닐수도 있으니 비슷한 경우라면 시도해보시길

도움 되셨다면 좋아요 댓글 남겨주세요.

도움이 안되셨다면 또다른 솔루션을 찾아보셔야겠습니다.

 

I found temporary solution

1. open your datawindow

2. go to data source (syntax mode)

3. how is your query in last line?

    in my case query's last line is finished with sentense so I entered in the end and make a new blank line

    and save with return and then retrieve performance is very fast and good

 

Warning: all case is not suitable. if you have same case with me, please try first.

 

If you get the good performance, please push like button and leave a message.

 

If not, you may search another alternative solution. ^^

 

Good Luck!!

 

******아래 방법이 더 효과적이네요*******

위의 방법으로 바뀐 쿼리가 적용되어 일시적으로 도움이 되었던듯..

https://100sstory.tistory.com/75

728x90