Fetch in tkprof

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fetch in tkprof

satish
Dear erman,

In below tkprof figures,it is the sql that took highest elapsed time. The execution time is less but looks fetch takes more time. From your experince,please let us know the reasons how can we avoid this.
SQL ID: 9w44sa4ant350 Plan Hash: 2559300826
 
SELECT CHT.CHALLAN_ID, CHT.CHALLAN_AMOUNT, CHT.PROPERTY_ID, CHT.PARTY_ID
FROM
 XXTTD.XXTTD_AR_DCB_CHALLANS_HDR_TBL CHT, XXTTD.XXTTD_AR_DCB_PROP_V DPV,
 XXTTD.XXTTD_AR_DCB_PROPS_HDR_TBL PHT WHERE DPV.LOCATION_ID =
 PHT.LOCATION_ID AND PHT.PROPERTY_ID = CHT.PROPERTY_ID AND CHT.ATTRIBUTE2 =
 'A' AND CHT.ATTRIBUTE5 = 'A' AND CHT.CHALLAN_DATE BETWEEN :B5 AND :B4 AND
 CHT.PROPERTY_ID = :B3 AND CHT.PARTY_ID = :B2 AND DPV.PROPERTY_REGION = NVL
 (:B1 , DPV.PROPERTY_REGION) GROUP BY CHT.CHALLAN_ID, CHT.CHALLAN_AMOUNT,
 CHT.PROPERTY_ID, CHT.PARTY_ID
 
call   count    cpu  elapsed    disk   query  current    rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse    1   0.00    0.00     0     0     0      0
Execute 60971   3.44    3.42     0     0     0      0
Fetch  60971  5923.01  5937.42     0 1322057231     0    1664
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total  121943  5926.46  5940.85     0 1322057231     0    1664
 
Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Fetch in tkprof

ErmanArslansOracleBlog
Administrator
It seems this sql get lots of data. You got lots of fetches.
Your execution is fast.. But still, you can the execution plan first..
See -> https://blogs.oracle.com/sql/post/how-to-create-an-execution-plan#tkprof

What is your client? I mean which application is executing this query?

This fetch things are related with the data returned from the database. So probably your sql execution is fast, but there are lots of data to be returned to the client and it takes time..

You may consider increasing the array fetch size in the client side..
You may consider finding a way to reduce the data (eliminating the unnecessary data) that is returned to the client -- you may do this by doing some modifications in the query..
You may find a way to increase your network speed.
Reply | Threaded
Open this post in threaded view
|

Re: Fetch in tkprof

satish
This in oracle  ERP application