SQL & PL/SQL :: Function Very Slow After Oracle Upgrade
Oct 11, 2012
We have a function that is called in various other PL/SQL packages, and performance has always been very good. On 29th Sept we upgraded our db to 10.2.0.5.0 and since then, a package that calls the function has gone from ~4mins, to ~2.5hrs to run.
In PL/SQL Developer, a simple select that calls the function has gone from ~0.5secs to retrieve the first 100 rows, to ~12secs. I ran a profile of the main package, which highlighted the where the bottleneck was (a fetch from an explicit cursor). Running an explain plan on the cursor SQL doesn't really show up anything untoward.
However, I found that if I subtly changed the cursor SQL, (so that it did the same thing, but was written differently), it fixed the performance problems.
where ade_start_date between cpDate-cpDays and cpDate-1
/*and ade_start_date < cpDate
and ade_start_date >= (cpDate-cpDays)*/
From this, we thought that there may have been a bad cached execution plan which the change of code forced a recalculation of. However, about 2 hours later, the changed code ran slowly again. So a further subtle change was made, which fixed the issue again. Until this morning, when it was running slowly again.
This feels like it is CBO/stats related potentially, but is out of my area of knowledge unfortunately. We have our DBA investigating this, but there may be things I can test to narrow down the possibilities in the meantime.
Along with existing RMAN backups we do Exports - of our DB using and OS User and Oracle Wallet.Of the DB's we have upgraded the Data Pump Directory
Select * from dba_directories; (there are other commands to get this info as well).
I captured screens from the DBUA upgrades, but did not see an option to change this information.Is there a way to feed this information to the install moving forward. IE, ./DBUA -silent ?
Also, anyone tracked the percentage of storage increase from 10.2/11.1 to 11.2.
I am going to upgrade database from 11.1.0.7 to 11.2.0.3
1) If compatible is set to 10.2.0 in 11.2.0.3, will it work ? 2) If compatible set to maximum level, will it affect our application ? 3) Whether any code related problem occurred after upgrading like PL/SQL codes ?
We are planning to upgrade our database from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi to Oracle Standard Edition 11g . We also have oracle apex installed on Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi database with oracle apex 3.1
No our plan to upgrade the database and oracle apex to 4.2. Since Oracle Enterprise Edition is licensing is very expensive we though of buying standard edition and upgrade to this version.
can we upgrade the oracle database from enterprise edition to latest standard edition?
I am migrating a oracle 9i database to 11g r3. I can only use imp. As the database is huge, I have split the exp dump by schemas. In my recent test, i have split the schema into 4 seperate threads to be imported into the new oracle11g database. The 4 thread of imp consist of almost similar sizes of schema (Eg thread 1 - Schema 1, 2 ,3. Thread 2 - Schema 4,5,6 etc)
All the dump files are in the same mount point. When i execute the import (4 threads) together, the total import timing is each thread is between 2.5 days to 3.5 days.
Then i proceed to try only 1 thread, only 2 hrs. So could this be a IO issue or oracle memory problem?
We are using one software it is a test tool for verify the data base posting speed from server to client systems. In windows 2008 R2, database posting speed is very slow when compare to windows 2003 server .
Server configuration is same for both servers ( RAID 5 , RAM 4 GB) how we can improve writing performance in Oracle
I have big trouble with some Update query on Oracle 11G.I have a set of tables (5) of identical structures and a view that consists in an UNION ALL of the 5 tables.None of this table contains more than 20 000 rows.Let's call the view V_INTE_NE. Each of the basic table has a PRIMARY KEY defined on 3 NUMBERS(10,0) -> INTE_REF / NE_REF / INSTANCE.
Now, I get 6 rows in another table and I want to update my view from the data of this small table (let's call it SMALL). This table has the 3 columns INTE_REF / NE_REF / INSTANCE.
When I try to join the two tables :
SELECT * FROM T_INTE_NE T2 WHERE EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE )
I get the 6 lines in 0.037 seconds
When I try to update the view (I have an INSTEAD OF trigger that does nothing (just return for testing even without modifying anything), I execute the following query :
UPDATE T_INTE_NE T2 SET INTE_STATE = -11 WHERE EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE ) The 6 rows are updated (at least TRIGGER is called) in 20 seconds. However, in the execution plan, I can't see where Oracle takes time to achieve the query : Plan hash value: 907176690
[code]....
Predicate Information (identified by operation id):
2 - access("T2"."INTE_REF"="T1"."INTEREF" AND "T2"."NE_REF"="T1"."NEREF" AND "T2"."INTE_INST"="T1"."INSTANCE")
Note- dynamic sampling used for this statement (level=2)
Statistics ----------------------------------------------------------- 3 user calls 0 physical read total bytes 0 physical write total bytes 0 spare statistic 3 0 commit cleanout failures: cannot pin
[code]....
I get exactly the same execution plan (when autotrace is ON).Furthermore, if I try to do the same update on each of the basic tables, I get the rows updated instantaneously.
I am trying to come up with a plan for an upgrade that is needed for a server I maintain. It is a Windows 2003 32bit running Oracle 10.2.0.3 on old Hardware. It also has two obscure 3rd party applications that are running on it that directly access the database. These applications are supported by off site consultants.
My initial plan was to Create a Windows 2008 R2 Virtual Server and install the same version of Oracle 10.2.0.3. Using Rman clone the database to the new server. Have the consultants come in and get the applications working. Once everything in the new environment seems to be working fine, run RMAN again and reclone the database to have all the latest data. Then at a later time upgrade the database to 11g 32bit. Virtually no downtime and we could spend all the time we needed getting the applications working and testing the new environment.
The plan is dead right of the bat though because I realize 10.2.0.3 is not supported by Windows 2008 R2. I really did not want to add an Oracle DB upgrade into the mix at the same time. Just because their are so many changes from the old environment to the new that I want to break this down into manageable chunks. And I can maybe get by with 1 day of down time.
So now I am looking at installing 11g on my Virtual Server, Clone the database, upgrade the database, have the consultants come in and get the applications working. All the while we are down. If we run into any problems, which you always do, it just completely blows the schedule.
I am using 11gR2 on windows server. This is the query that runs many times a day and effect badly the performance of database. I don't have much idea about this query.
SELECT TO_CHAR(current_timestamp AT TIME ZONE 'GMT', 'YYYY-MM-DD HH24:MI:SS TZD') AS curr_timestamp, COUNT(username) AS failed_count FROM sys.dba_audit_session WHERE returncode != 0 AND TO_CHAR(timestamp, 'YYYY-MM-DD HH24:MI:SS') >= TO_CHAR(current_timestamp - TO_DSINTERVAL('0 0:30:00'), 'YYYY-MM-DD HH24:MI:SS')
I have an Oracle database (9.2.0.7) installed on a HP-UX server.When trying to access this database from another HP-UX or Linux server, connection is fine. But when trying to connect from a Windows based client, connection is very slow (almost 1 minute to return the result of a 'select count(*)' like query, which is immediate from the Linux client).
Here are some facts I can add :
- Clients and servers are on the same network segment (it is not a network matter)
- No matter which client version I use, there no difference
- I tried to know what happens on the Oracle server when performing my sample query using tusc command : the result is that the server is performing exactly the same actions when sending my query from a Linux client or a Windows client
- The only relevant difference seems to be the client OS
I'm planning to upgrade a small database (~150GB) from 10.2.0.3 on windows 2003 23bit to 11.2.0.3 RAC on Linux 5.8.The database contains oracle spatial too. A suitable method and link to document to be followed.
I recently performed an upgrade on a new server from oracle 10gr2 to oracle 11gr2 (11.2.0.3).
I take the rman backup from oracle 10g server and restore it on new server where I installed oracle 11gr2.
But on my previous oracle 10gr2 server I enabled the auditing. After doing successful upgrade now when I try to login with any user except sys I receive the following error:
SQL> conn scott/tiger ERROR: ORA-00604: error occurred at recursive SQL level 1 ORA-00904: "OBJ$EDITION": invalid identifier ORA-02002: error while writing to audit trail ORA-00604: error occurred at recursive SQL level 1 ORA-00904: "OBJ$EDITION": invalid identifier
I got the workaround by setting the parameter audit_trail=FALSE (Previous value was DB_EXTENDED) .But I want my auditing to be enabled as per y requirements.
find reference note IDs for DB upgrade from 11.2.0.2 to 11.2.0.3.2, as I am finding only Exadata which I don't want but I want to find for Ebiz database, on OS - Solaris 10 9/10 s10s_u9wos_14a SPARC.
I am trying to upgrade database from 9.2.0.7 to 10.2.0 in my test server. Here are the steps i am planning to do.
1. Export user data of production, Import in test db(ABC) using Destroy=Y Fromuser,touser parameter( this step just to refresh old test data) 2. Install 10g db, Use DBUA Utility of 10g to start upgrade>select 9i database which i want to upgrade 3. follow DBUA instruction ..create datafile paths, init.ora file, tnsnames,listener... same as the existing setup i have of 9i(so i can make replica of 9i in 10g)
question: I have another database(xyz) in test server its also in 9i, I don't want to upgrade that for now. so do i need to use one listener /tnasnames file of 10g and include setting of 9i in that 10g file ?
How to manage init,tnasnames,listener files setting in 2 db versions . Is there anything else i need to do to perform upgrade 9i-10g ? or its all ?
I will install just 10g database will import full export of 9i db. if i can do full import in 10g or should i just go for fromuser, tuser option to import? i believe for that i need to create datafiles, user,grant in new 10g db. I am not sure which option is best to perform 10g upgrade?
Recently we have upgraded our database from Oracle 9.2.0.8 to Oracle 11.1.0.7. But now the new requirement comes that it should be upgraded to Oracle 11.2.0.1
Our OS environment - UNIX AIX 5.3
Since its a development database, we have dataset of Oracle 9i and Oracle 11g1 cold backup. I have a query regarding this. what would be the best way to upgrade, is it from Oracle 9i to Oracle 11g1 or Oracle 11g1 to Oracle 11g2?
My Oracle DB 10.2.0.1 is working fine in Windows XP. Now, I want to upgrade to Oracle 10.2.0.4. I have two Oracle CDs
1) Oracle Database Vault 10g release 2(10.2.0.4.0) for Microsoft Windows DVD& 2) Oracle Enterprise Manager 10g release 4 Grid control (10.2.0.4.0) patch for Microsoft Windows DVD.
But I don't have metalink support. How can I upgrade Oracle DB.
After upgrade 10g to 11g, the below sql is not working. I have issue with connect by, if we use it with subquery it will hang.
select item_code from bom_list_pos where ln_id in (select ln_id from bom_list_nodes start with ln_id IN (select ln_id from bom_used_work_pack where rownum =1) connect by prior ln_id = parent_ln_id)
I ran 10g, able to get it less than minute, but 11g hang. below is explain plan.
I am migrating Oracle windows 32-bit (10g) db to hp-ux machine (11g R2). I have exported all the data from windows machine using dp and plan is to export it to 11g db on UNIX. Before I start the import I need to have similar structure on newly created 11g db on UNIX (tablespaces etc). I am wondering what would be the best option to
1. Generate the code to create all the tablespaces on the new database 2. How can I tell import into different tablespace? 3. I would like import indexes into separate tablespace than data.
Our company is using forms 4.5 on Oracle 8.0.6. We want to upgrade to forms 6i. But there is no oracle support available for this version. Before going to forms 10g, we have to upgrade our forms to 6i.
My question is how do we request to Oracle support to supply us the 6i installation CD's. Is there any particular format to request upgrade from oracle support?
Question:1 I am trying to upgrade 9i to 10g , using DBUA. I am getting below error at step 1:
There is an error in creating the following process: C:\oracle\ora92\bin\sqlplus -s/nolog
The error is: createprocess:C:\oracle\ora92\bin\sqlplus -s/nolog error:193
I can login as sysdba ,using C:\oracle\ora92\bin\sqlplu for both 9i as well as 10g i did set oracle_home to C:\oracle\ora92, using command prompt.
Question 2:Is there any way i can generate the database template of running production so i can use same template to create the test server. I cant find existing template in prod :ORACLE_HOME/assistants/dbca/templates , all templates looks like the default one only.
Question 3:If i have different structure in test db server i.e i have datafiles, controlfiles in I and J drives in production, but in test i have all datafiles ,control files in H:drive Can i use Transport_tablespaces import to upgrade test server ?
I have been trying to upgrade my personal laptop with 11G from 10G. Since I didn't had any important data, so i removed 10G and tried to go for a fresh install of 11G.
Currently, We are running oracle 11.2.0.1 on Linux server. There are 32 DB instances on this server. As per requirement, we need to install 11.2.0.2 DB on the same server. Is it advisable to have both 11.2.0.1 and 11.2.0.2 databases on the same server with different ORACLE_HOME.
How about ORACLE_BASE?? OR, do we need to upgrade all the DB's from 11.2.0.1 to 11.2.0.2. During the upgrade process, if i need to take backup with exp/imp utility, what is the best way to take 32 DB's backups instead of taking each DB backup at a time?