We have an application that is executing the same query with widely varying times in different database instances.
The problem is that in our Development instance, it runs fine, in our Production instance it is getting hung up causing reports to time out.
We have checked for any discrepancies in server environments, database parameters, etc. Both are Oracle9i databases and we found nothing about the environments to explain the difference in execution time.
Can anyone help me with questions to research or provide any answer to what might cause a discrepancy like this?
Here's the query (there are only 412 rows in this table!):
SELECT DISTINCT ancillary_cty_town_cd FROM CTY_TOWN_CD_TBL
WHERE UPPER(cty_town_nme) = UPPER
b1)
AND ancillary_cty_town_cd <> 0
AND ancillary_cty_town_cd is not null
AND void <> 'Y'
We have the following statistic information:
PRODUCTION RESULTS
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 4339 5.56 68.23 0 8822 26781 0
Fetch 4339 3.05 5.38 0 21695 0 4105
DEVELOPMENT RESULTS
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.02 0.01 0 0 0 0
Execute 4515 0.08 0.09 0 0 0 0
Fetch 4515 2.56 2.51 0 22575 0 4515
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 64 (USER) (recursive depth: 1)
Rows Row Source Operation
------- ---------------------------------------------------
4105 SORT UNIQUE
9318 TABLE ACCESS FULL CTY_TOWN_CD_TBL
I appreciate any direction anyone can give me to help answer the "why" being asked. We must first explain why the databases are acting differently on the same query before we can give it back to application development to rewrite or tune the query itself... (Which does make sense - we want to understand the cause first.)
Thank You!
The problem is that in our Development instance, it runs fine, in our Production instance it is getting hung up causing reports to time out.
We have checked for any discrepancies in server environments, database parameters, etc. Both are Oracle9i databases and we found nothing about the environments to explain the difference in execution time.
Can anyone help me with questions to research or provide any answer to what might cause a discrepancy like this?
Here's the query (there are only 412 rows in this table!):
SELECT DISTINCT ancillary_cty_town_cd FROM CTY_TOWN_CD_TBL
WHERE UPPER(cty_town_nme) = UPPER
AND ancillary_cty_town_cd <> 0
AND ancillary_cty_town_cd is not null
AND void <> 'Y'
We have the following statistic information:
PRODUCTION RESULTS
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 4339 5.56 68.23 0 8822 26781 0
Fetch 4339 3.05 5.38 0 21695 0 4105
DEVELOPMENT RESULTS
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.02 0.01 0 0 0 0
Execute 4515 0.08 0.09 0 0 0 0
Fetch 4515 2.56 2.51 0 22575 0 4515
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 64 (USER) (recursive depth: 1)
Rows Row Source Operation
------- ---------------------------------------------------
4105 SORT UNIQUE
9318 TABLE ACCESS FULL CTY_TOWN_CD_TBL
I appreciate any direction anyone can give me to help answer the "why" being asked. We must first explain why the databases are acting differently on the same query before we can give it back to application development to rewrite or tune the query itself... (Which does make sense - we want to understand the cause first.)
Thank You!