I need to have below details from production database(11.2.0.3 or 10.2.0.4).
1.Cache hit ratios for a day, for a week, for a month.
2.Top 10 sql command sorted by elapsed time, cpu time, physical read/write. This is also for a day, for a week, for a month.
3.Top 5 wait event of a day, of week, of month.
Well I don't want to use awrrpt.sql script. I want to do it through queries.
When looking at some of the metrics available in OEM, I am puzzled by the interpretation:
1) Using the Host tab, and load metrics, I can get a metric for the Total I/O for the host .. I assume this is IOPS.
2) Using the Database tab, and the instance_throughput physreads_pc metric I can get a metric for the Physical Reads from the database instance per second.
3) We generally have several Oracle instances on the same server, and in all cases, the sum of the physical reads for each database is SIGNIFICANTLY higher that the total i/o for the host.
Am I interpreting the information incorrectly ? Does one of the metrics consider db_block_size ?
Any complete List iof possible Metrics from Grid Control after installarion? No User-Defined, only Standard Metrics. How can I find them, I just checked Documentation and Metalink - but no result.
Any list prepared before or can point to any "how to create".
I have created some views in one SCHEMA and made it invalid by dropping it's base table
1) Thru some queries, on SQL, I checked it shows there are invalid objects. 2) But even though , I refreshed DBCONSOLE Home Page it doesn't show the invalid objects. 3) How frequently ALERT METRICS are collected/refreshed.
How the length of column width effects index performance?
For example if i had IOT table emp_iot with columns: (id number, job varchar2(20), time date, plan number)
Table key consist of(id, job, time)
Column JOB has fixed list of distinct values ('ANALYST', 'NIGHT_WORKED', etc...).
What performance increase i could expect if in column "job" i would store not names but concrete numbers identifying job names. For e.g. i would store "1" instead 'ANALYST' and "2" instead 'NIGHT_WORKED'.
I have a question about database fragmentation.I know that fragmentation can reduce performance in query times. The blocks are distributed in many extents and scans process takes a long time. Oracle engine have to locate the address of the next extent..
I want to know if there is any system view in which you can check if your table or index has high fragmentation. If it's needed I will have to re-create, move or rebulid the table or index, but before I want to know if the degree of fragmentation is high.
Any useful script or query to do this, any interesting oracle system view?
How many records could I have in a single table without performance degradation with Standard Edition without partitioning with cutting-edge server (8 or 12 cores, 72 GB RAM, FC 4 Gbit, etc...) and good storage?
300 Millions in only one table with 500K transactions / day is too much?
Testing our 9i to 11g upgrade, we've imported the entire DB into the new machine.We've found that certain procedures are really suffering performance problems. BUT, we've also found, that if we check out a production copy of the procedure from our source code control, and reinstall it, the performance issue goes away. Just alter the procedure and recompiling does NOT work.
The new machine where the 11g database exists is slightly different than the source, but it's not like we have this problem with every procedure. It's only a couple.
any possible reason that we'd have to re-install a procedure to correct a performance problem?
I need to check the package performance and need to improve the package performance.
1. how to check the package performance(each and every statement in the package)? 2. In the package using the delete statement to delete all records and observed that delete is taking long time to delete all the records in the table(Table records 7000000). This table is like staging table.Daily need to clean the data before inserting the data into it. what can I use instead of Delete.
Somewhere I read that we should not use hints in Oracle production environments, but we can use hints in the development environment and on achieving the desired execution plan we can adjust the 'statistics' to follow that plan without hints.
Q1. If it is true what statistics do we adjust for influencing the execution plan and how?
For example, I have the following simple query:
select e.empid, e.ename, d.dname from emp e, dept d where e.deptno=d.deptno;
emp.empid, emp.deptno and dep.deptno columns have indexes and the tables have the standard structure as found in the basic oracle examples.
If I look at the execution plan of the above query then I see that the driving table is empand the driven table is dept.Also the type of join that is taking place is 'Nested Loop'.
Questions: With respect to the above query, Q 2. If I want to make dept the driving table and emp the driven table then how can I adjust the statistics to achieve that? Q 3. If I want to use hash join instead of a nested loop join then then how can I adjust the statistics to achieve that?
I can put the ordered and the use_hash hint to effect this but again I have heard that altering statistics is a more robust way to control an execution plan as compared to hints.
When i exporting an user using expdp utility, the load the on the server is going up-to 5. The size of the database is 180GB. Below is the command that i use for export.
The following query gets input parameter from the Front End application, which User queries to get Reports.There are many drop down boxes like LOB, FAMILY, BRAND etc., The user may or may not select values from drop down boxes.
If the user select any one or more values ( against each drop down box) it has to fetch all matching values from DB. If the user does'nt select any values it has to fetch all the records, in this case application will send a value 'DEFAULT' (which is not a value in DB ) so that the DB will fetch all the records.
For getting this I wrote a query like below using DECODE, which colleague suggested that will hamper performance.From the below query all the variables V_ are defined in procedure which gets the values selected by user as a comma separated string here V_SELLOB and LOB_DESC is column in DB.
DECODE (V_SELLOB, 'DEFAULT', V_SELLOB, LOB_DESC) IN OPEN v_refcursor FOR SELECT /*+ FULL(a) PARALLEL(a, 5) */ * FROM items a WHERE a.sku_status = 'A'
what the principal things to look at when we have for the same query different performance results are?I have 2 different bases: the plan and data are the same but performance results are very differents.
are the most important performance keys we have to calculate or take in account to preserve or to increase the DB performance in terms of response times, and whatsoever according to performance ?
we are using windows server 2008 R2 and oracle database version 11.2.0.2
Have two points here : I/O performance and Out of memory issue
1.) ADDM Report recommended solution is to stripe all data files for to reduce "Wait class "User I/O" was consuming" But I am not sure It will improve more I/O performance(it will resolved the issue) and same issue we are getting on many servers.
ADDM Report Snipped:
Findings and Recommendations ---------------------------- Finding 1: I/O Throughput Impact is .28 active sessions, 44.97% of total activity. --------------------------------------------------------
The throughput of the I/O subsystem was significantly lower than expected.
Recommendation 1: Host Configuration Estimated benefit is .28 active sessions, 44.97% of total activity.
[code]....
2.) Same issue we got in another server and we increased memory thrice but again we got same below error. Now we are getting same below error another server.
Alert log Snipped:=
Wed Jun 12 07:12:15 2013 Process startup failed, error stack: Errors in file E:\APP\ORACLE\diag\rdbms\oemgc\oemgc\trace\oemgc_psp0_3316.trc: ORA-27300: OS system dependent operation:CreateThread failed with status: 8 ORA-27301: OS failure message: Not enough storage is available to process this command. ORA-27302: failure occurred at: ssthrddcr
We are having a major issues with the batch run. we are using oracle 11g db. We run the scripts to populate the tables and then call scripts to run the extractions. The issue here each time we run the sql it takes so much inconsistent time.We have created index and run the db stats then run the extractions.The sql sometimes takes 10 minutes or sometimes takes hours to run? This is major show stopper of the project.
We have a strange performance issue in our production database.
After migrating our production database from 10g (R2) to 11g (R2) we started seeing major performance issues in the I/O's.
we do have baseline calculation process which runs past midnight every day. Before 11G migration it used to complete in less than 1 Hour, since migration (3 days ago) it started taking more than 5 hours. It just showing major I/O activity (db sequential reads) when the job was running but nothing else. The I/O was always because of the index range scan over a 1.8 billion rows table. By using the Hints we forced Oracle to use the same explain plan it was using on 10G. The query basically index range scans last 60 days worth of data for a specific person out of 1.8 billion rows. Indexes are created with date column in descending order to make the index scans faster while searching for latest data.
when i compared the historical AWR from 10g to 11G I have noticed for same process number of physical reads(sequential) are more in 11G than in 10G. Even physical I/O waits are also more comparatively in 11G because of the more reads i guess. I am thinking may be Oracle scanning index more than what it needs to though we have Histograms on the indexed columns.
My question is , are there any other factors/parameters that we can manipulate to cheat Oracle and make it do fewer physical reads (required) for both both index and table.
Does Histograms only selecting correct index or do they dictating how much percentage of index to be scanned for the current operation also?
Again indexes are same and explain plan is exactly same but more physical I/O in 11G than in 10G. Way to minimize the I/O scans?
I am working on an assignement where client is using Oracle 10g but stuck to using RBO Now the application team, from the GUI available to them build dynamic queries and some of them run very slow.
Neither the code can not be changed to tune the queries nor do we get the exact step in the plan which is an issue (being RBO).For some long running queries the Tuning advisor is not producing any recommendations.
Another hurdle is that all the application users are using same application user id so we can not write a logon trigger to use CBO for some particular queries to see what is happening in the background!
I want to tuning the next sql sentence. In this sql I want to get the hash_value and sql_text of the sentences that it's causing TX blocks. Is it possible?. This sentence works fine but sometimes It's slow.
SELECT DISTINCT hash_value, sql_text FROM gv$sql sq WHERE hash_value IN (SELECT DISTINCT prev_hash_value FROM gv$session se WHERE sid IN (SELECT sid FROM gv$lock l WHERE type = 'TX' AND ctime >= 2000 AND l.inst_id = se.inst_id AND l.sid = se.sid) AND sq.inst_id = se.inst_id); [code]....
I see one of my SQL's which is ran by the user on a 10.2.0.3 database changing its SQL_ID after some runs even if the query is not changed a bit! However the HASH VALUE for this query remains the same.
how a same query can have different SQL_ID's but same HASH_VALUE?
Note: Statistics are not modified on the base tables of this query.
I am running Oracle 10.2.0.1.0 on MS Windows 2003 server 64-bit with 16G RAM.
Here is the findings for my Oracle database.
SQL> select * * from v$sgainfo; NAME BYTES RES -------------------------------- ---------- --- Fixed SGA Size 1293560 No Redo Buffers 7094272 No Buffer Cache Size 830472192 Yes
[code]...
I find that the SGA component "Buffer Cache" is decreasing from the start "1.8G" and down to now 0.8G. On the other hand, the component "Shared Pool" is increasing from the start 0.3G to now 1.2G. I noticed that there are 100 operations of shrinking of "Buffer cache" and growth of "Shared Pool" in Oracle every day.Is it a indicator that I should raise up the SGA_MAX_SIZE?
I tried to increase the SGA_MAX_SIZE to 4G. But I cannot start the Oracle afterward.Is it a limitation of MS Windows(OS) or Oracle?I set the SGA_MAX_SIZE to 3G. This time, I can startup Oracle.What is the optimum/maximum I can set to SGA_MAX_SIZE?Is there any adverse effect/concern when setting the SGA_MAX_SIZE more than 2G?
Lot of my tables are just for join purpose , a table with just with two columns both FK , I did not add any composite PK to this table, lot my queries uses this table , because it does not have composite PK will the query be slow ? what I have to do to increase performance querying with such tables ?
Here i have three tier application. I want to know it host name from sid or sqlid . I want to know which query run on which host. Because i have one user from application to database. So i want to know which query consume more time on which host ?
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 have a lot of queries on a table with WHERE clause:
WHERE CR_DATE > :y AND CR_VALUE = :x
Actually, there is an index on (CR_DATE) but much more selective index is on (CR_DATE, CR_VALUE). If I do not UPDATE any records on this table, is there any difference in INSERT operation (or another problem) when I replace actual index with multi-column index?