SQL ANALYZER
Hello
Working on 10g/windows
I'm working on trying to tune a sql statement using the sql analyzer, but I need to know the difference between
Response Time
Component Time (in secs) pct of total resp time
CPU Time: 0.688 12.0%
Non-idle Wait Time: 0.003 0.1%
Idle Wait Time: 1.847 32.3%
Response Time Unaccounted-for: 3.179 55.6%
Total Trace Response Time: 5.716 100.0%
Trace Response Time Accounted-for = 2.521
Sory, my question is to know, among the above metrics wich one to take as the effective response time of the SQL statment?
Thanks
Similar Messages
-
SQL Parsing Bug in Oracle SQL Analyze in 9i
The following does not work in SQL Analyze on 9i:
select extract(HOUR from to_TIMESTAMP('2003-02-28 13:00:00','YYYY-MM-DD HH24:MI:SS')) FROM DUAL;
It complains at there being two "from" in the SQL.
As I'm new to OTN is there a fix for this bug and is it listed in a bug tracker?
ThanksHi Rodrigo,
Thank you for reporting this. The only bug I see currently logged on a comment affecting the generated View DDL involves ending the last line of the definition with a comment, which treats the ending semi-colon (even if on a different line) as part of the comment. That is actually related to a low-priority bug against an Oracle database API.
Unfortunately, your pseudo-code is a bit complex. Trying a few quick, simpler tests against the standard HR schema did not reproduce the issue. I tried INNER JOIN, and nested SELECTs. It would help greatly if you could provide a test case compilable against one of the standard schema, like HR or SCOTT.
Regards,
Gary
SQL Developer Team -
High invalidations in v$sqlarea for 1 query tag with "SQL Analyze"
Hi All,
Hopefully post to the right forum, if not please do let me know. Thanks
I have one pre-production issue still don't have any clue how to move forward.
This is 2 RAC nodes in linux platform with Oracle 11.2.0.2
In the begininng this environment having a lot of performance issue, as huge "cursor: pin S wait on X", "latch: shared pool"
and "library cache:Mutex X" causing very bad performance in this environment. After oracle support suggest to disable few hidden paramter
and adjust some parameter, then it help to stablized the environment (according to oracle, the initial issue was caused by high version count).
But we still can find minimal "latch:shared pool" and "library cache:Mutex X" on top 5 wait event list on hourly AWR report.
This time oracle was saying it might caused by high reload and high invalidatiosn in sqlarea (not sure how true it is), luckily the event
did not caused the performance issue at this moment, but we're asking support how can we get rid of the "mutex/latch" event.
They give me one query to check the invalidations in v$sqlarea, and they suspect the high validation is causing by application.
select *
from v$sqlarea
order by invalidations DESC;
Weird thing is, there have one SQL tag with "SQL Analyze" always causing high invalidations. But we're not able to get more detail (base on SQL_ID)
in v$sql or v$session table. This SQL insert into v$sqlarea and remove within 1 or 2 seconds, hard to get more information.
And the statement is exactly the same, but don't know why SQL Analyze always checking on it.
This SQL is triggering by SYS user, and it is inserting into MLOG$ table (one of the application materialized log file)
insert into "test"."MLOG$_test1" select * from "test"."MLOG$_test1"
The v$sqlarea information as below, sometime the invalidations can hit more than 10,000
SQL_ID SQL_TEXT LOADS INVALIDATIONS
0m6dhq90rg82x /* SQL Analyze(632,0) */ insert into "test"."MLOG$_test" select * from "test"."MLOG$_test 7981 7981
{code}
Anyone have any idea how can i move forward for this issue? As Oracle is asking me to use SQLTXPLAIN get the detail?
Please share with me if you have any idea. Thanks in advance.
Regards,
KlngHi Dom,
We have checked there have no SQL Tuning enable for this SQL_ID. Below is the optimizer parameter in this environment, the hidden parameter was changed which suggest by oracle support.
NAME TYPE VALUE
_optimizer_adaptive_cursor_sharing boolean FALSE
_optimizer_extended_cursor_sharing_r string NONE
el
object_cache_optimal_size integer 102400
optimizer_capture_sql_plan_baselines boolean FALSE
optimizer_dynamic_sampling integer 2
optimizer_features_enable string 11.2.0.2
optimizer_index_caching integer 90
optimizer_index_cost_adj integer 10
optimizer_mode string ALL_ROWS
optimizer_secure_view_merging boolean TRUE
optimizer_use_invisible_indexes boolean FALSE
optimizer_use_pending_statistics boolean FALSE
optimizer_use_sql_plan_baselines boolean TRUE
plsql_optimize_level integer 2
SQL> select * from dba_sql_plan_baselines;
no rows selected
SQL>yeah we did run the ash, but the high invalidation did not caputre in the report. Actually this SQL tag with sql analyze it gone from v$sqlarea very fast (only 1 or 2 seconds only).
Thanks.
Regards,
Klng -
Oracle SQL Analyze 9.0.1.0.0 not liking 9i SQL
Hi people,
Could someone tell me how to get the OEM SQL Analyze product to deal with the 9i SQL syntax... both the CASE and ANSI "JOIN" syntaxes seem to be failing to parse. As both of these constructs are used in our application we really need to know how to tune them.
Any ideas?
Thanks,
Lachlan PittsOracle DS is not the proper software for this purpose, take Oracle 9i client CD instead.
-
I am looking for a sql analyzer tool.
I am looking for a sql analyzer tool that can analyze the speed of two queries...
You mean like autotrace, set timing on, or alter session set events '10046 trace name context forever, level 12' , or you can write your own test harness. Depends upon what you want, exactly. Wall time, cpu time, average over 100 executions? Max time during busiest time of day in the database. Min time during quietest time of day in the database.
A simple test harness like this might be sufficient.
declare
l_start number;
begin
l_start := dbms_utility.get_time;
-- do your query here
dbms_output.put_line( (dbms_utility.get_time-l_start) || ' hsecs' );
end;
Edited by: ajallen on Jan 12, 2010 11:28 AM -
Hi, all.
I write this query into SQL Analyze:
SELECT nm
FROM rel_cabj_asunto
WHERE numas = CONCAT(CONCAT(:1, '/'), :2)
and after put the variables, I obtain this message:
XP-21016: A database error has occurred:
SELECT nm
FROM coyote.rel_cabj_asunto
WHERE numas = CONCAT(CONCAT(:1, '/'), :2)
ORA-01008: no todas las variables han sido transferidas
Cause: A server error has occurred while attempting to
access the Oracle Expert Services repository or
the target tunable database. The ERROR text
provides the specific Oracle server error message.
Action: If the error indicates an environmental problem,
e.g. the instance is not started, then correct
the problem.
Any comment?
Thanks in advance.Yes
I also got the same problem with 11g but not with 10g.
in my case, i am executing only select query from application (using prepared statement) .
It returns approx 500 characters for a column in the result.
I do not get the error when i execute the query (generated by app) from some of SQL client.
But when the same query is executed from app (using prepared statement), i get the error
"ORA-00910: specified length too long for its datatype".
If same query is supposed to reutrn less than these 500 characters for one column in result, it works fine.
I am facing this problem with 11g only.
It is working fine for 10g oracle db.
Is there any help on this.
What settings/configurations, i am supposed to do for resolving it.
Edited by: Manish Mishra on Nov 9, 2010 11:05 AM -
SQL Analyze & Tuning Pack - Login/Password
Oracle Version: 8.1.6
OS:- NT
Whenever I launch SQL Analyzer its asking for
Administrator, Password and Management Server. Its is accepting only SYSMAN loginame and password. Once I am inside the
tool, Get Explain plan for any SQL Statements because of XP-21016 ( oracle invalid column name error)
I read the documentation about SQLADMIN role we have to set up for the user. But only way I can log on is sysman, how can I set up SQLADMIN role.
Thanks for your help.
nullRodney,
Thanks for the reply. Yes, I agree, the Java console which runs directly on Windows is quite limited. Change Manager is there, as you indicated. However, MetaLink note 277066.1 indicates that "Tuning Pack Functionality" is also available in the Java version, and I don't see any of it there.
What I'm looking for is a framework for testing different versions of an SQL statement. I want to be able to execute the current version of a statement and, for example, a modified version with a hint added. I want to be able to see at least the basic statisitics comparing the two exections (e.g., elapsed time, logical reads, physical reads). This was possible with SQL Analyze in 9i, but I can't find anything like it in 10g.
I have found both the 10g advisors you mentioned and they do seem to work, but they don't provide the same flexibility and power for working on statement tuning apart from what the advisors recommend.
Thanks for all the suggestions/ideas...
Dave -
Dear All
Where i can download Oracle SQL Analyze download
ThanksGoogle -> Oracle SQL Analyze
That's not as hard...
Francois -
SQL PERFORMANCE SQL ANALYZER of 11g
I am using 11g on Windows 2000, I want run SQL PERFORMANCE ANALYZER to see the impact of parameter change on some sql’s. Currently, I am using it in a test environment, but eventually I want to apply t to production environment.
Let us say I want to see the effect of different values db_file_muntilbock_readcount.
When I run this in my database, will the values changed impact only the session where I am running sol performance analyzer, or will it impact any other sessions, which are accessing the same database instance. I think, it impacts only the session where SQL Performance analyzer is being run, but want to make sure that is the case?
Appreciate your feedback.I think, it impacts only the session where
SQL Performance analyzer is being run, but want to
make sure that is the case?The database instance is part of a larger 'system' which includes a fixed set of physical resources. Your session, and every other session, work within the constraints of those resources. When you change the current SQL statement, you will be moving the balance between those resources.
For example, a disk can only respond to one access request at a time. A memory location can be used for one piece of data at a time. A DB cache buffer can only reflect one block at a time. There are a lot of 'points of serialization'.
Although the major impact should be on the current session, there will be some impact on every other session in the system.
BY the way, there is an 'edit' button available to you for every post you create. As a courtesy, you could edit the title of the duplicate and let us know it is indeed a duplicate - or you could edit that other thread to ask that other question you were going to ask. -
Hi,
I have to create a parser for PL/SQL 8i.
Any help on what to start with would be very helpful.
I hope to use the EBNF rules for the parsing. Am I in the right direction?
Are there any open source code for PL/SQL parser ?
Thanks & Regards
Aswin AsokanHi,
I have to create a parser for PL/SQL 8i.
Any help on what to start with would be very helpful.
I hope to use the EBNF rules for the parsing. Am I in the right direction?
Are there any open source code for PL/SQL parser ?
Thanks & Regards
Aswin Asokan The direction is right as far as I know but the task
is really difficult. PL/SQL's syntax is inherited
from ADA language which is BIG one and very complex to parse.
And there is SQL part as well. Just look at the
market - so few products are based on this kind
of parser (PL/SQL) - as I can guess.
For example:
Formatter Plus (www.quest.com),
ClearSQL (www.clearsql.com),
CAST PL/SQL Analyzer (www.castsoftware.com),
LECCO SQL Expert for Oracle (www.leccotech.com ) - as I can assume but I'm not sure.
Probably you may search the net for a little subset of this
parser - for ANSI SQL or for ADA to start with. -
SQL Statement / index on function ??
Hello
My environment is : Oracle 9.2.0.7
In "top sql sessions" I obtained that sql statement as below consumes many ressources.
When I use "SQL Analyzer" ... no recommandation was specified but I wonder if an index on function may be use to optimize this request.
I'd like to have your opinion on how to optimize this kind of request :
SELECT trim(CARD_NUMBER) as CARD_NUMBER,
trim(CUSTOMER.CLIENTS.CUSTOMER_ID) as CUSTOMER_ID,
trim(LASTNAME) as LASTNAME,
trim(FIRSTNAME) as FIRSTNAME,
trim(EMAIL) as EMAIL,
FROM CUSTOMER.CARTES, CUSTOMER.CLIENTS
WHERE CUSTOMER.CARTES.CUSTOMER_ID = CUSTOMER.CLIENTS.CUSTOMER_ID
AND trim(CUSTOMER.CARTES.CARD_NUMBER) = '1234567890'
AND (trim(CUSTOMER.CLIENTS.POST_CODE)='12345')
Plan execution is :
SQL STATEMENT :
JOIN
TABLE ACCESS (FULL) CUSTOMER.CARTES
TABLE ACCESS (FULL) CUSTOMER.CLIENTS
Many thanks for any help.
Regards,
GuillaumeAND trim(CUSTOMER.CARTES.CARD_NUMBER) =
'1234567890'
AND (trim(CUSTOMER.CLIENTS.POST_CODE)='12345')Yea function based index on trim(CUSTOMER.CARTES.CARD_NUMBER) and trim(CUSTOMER.CLIENTS.POST_CODE) might help.
BUT I suggest to correct data insertion app and insert already trimmed data in your table to avoid such ugly queries.
Gints Plivna
http://www.gplivna.eu -
How to use Tuning Pack for SQL tuning
We're just getting started with 10g, and I'm more familiar with 9i. In OEM 9i, there was something called Oracle SQL Analyze. It allowed you to work on a problem SQL statement, adding hints, making other changes, etc., and then you could easily compare the plan for two versions of a query. You could also execute right from there and it'd let you click on a tab to view the statistics. You could compare the statistics for two versions of the same statement.
I don't see anything like this in 10.1 GC, and that's with both the Diagnostic and Tuning Packs activated. There are a number of ways you can identify an SQL for analysis, then get an explain plan, then get some recommendations. But I don't see anything that allows you to add hints, compare different versions of the explain plan, or compare the statistics for different versions of a statement.
Am I missing something?
Thanks.
DaveRodney,
Thanks for the reply. Yes, I agree, the Java console which runs directly on Windows is quite limited. Change Manager is there, as you indicated. However, MetaLink note 277066.1 indicates that "Tuning Pack Functionality" is also available in the Java version, and I don't see any of it there.
What I'm looking for is a framework for testing different versions of an SQL statement. I want to be able to execute the current version of a statement and, for example, a modified version with a hint added. I want to be able to see at least the basic statisitics comparing the two exections (e.g., elapsed time, logical reads, physical reads). This was possible with SQL Analyze in 9i, but I can't find anything like it in 10g.
I have found both the 10g advisors you mentioned and they do seem to work, but they don't provide the same flexibility and power for working on statement tuning apart from what the advisors recommend.
Thanks for all the suggestions/ideas...
Dave -
Connecting Oracle 9i as a linked server of SQL Server 2000
I have a problem inserting String values into Oracle 9i as a linked server or SQL Server 2000.
When I run the following in SQL Analyzer:
insert into ORACLEOLE..ADMIN.FM_SQL values('asdf','qwer');
The result msg is:
Server: Msg 7356, Level 16, State 1, Line 1
OLE DB provider 'OraOLEDB.Oracle' supplied inconsistent metadata for a column. Metadata information was changed at execution time.
OLE DB error trace [Non-interface error: Column 'FM_ID' (compile-time ordinal 1) of object '"ADMIN"."FM_SQL"' was reported to have a DBTYPE of 129 at compile time and 130 at run time].
Is this a problem that the Charaterset of Oracle 9i being 'ALU32UTF8' ?
I have tried changing the field's type to varchar2, char, nvarchar2 and nchar...and they didn't work.
However, when the field type is a number(10) and I insert to the table integer values, the sql works fine.
so..any data mapping need to be done explicitly?
Thanks in advance.Based on my reading of the ANSI SQL-92 standards, table names are supposed to be in upper case.
"of course, any lower case letters appearing in a <regular identifier> will have been converted to the corresponding upper case letter before the <identifier> is stored in any table of the Information Schema"
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
Given that table names are supposed to be in upper case and they are in fact in upper case, why don't you just ask for them in upper case in the first place? -
Hi,
I like to choose one among the operators coming from the web page.
Like >, <, >=, Between etc etc ..
Using this I have to execute a certain query.
For eg in the case of > I will execute total_amount > amount;
in the case of < I will execute total_amount < amount;
but in the case of between, I will execute total_amount between min_amount and max_amount.
I am trying to use the dynamic SQL to code this where condition and using it in the cursor to fetch data. Please suggest me a solution to resolve this without duplicating the query that many times as the operator.
I have attached the query for your perusal.
WHEN oppsRange = 'EQ' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT = :V1';
WHEN oppsRange = 'LT' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT < :V1';
WHEN oppsRange = 'GT' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT > :V1';
WHEN oppsRange = 'LE' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT <= :V1';
WHEN oppsRange = 'GE' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT >= :V1';
WHEN oppsRange = 'NE' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT <> :V1';
WHEN oppsRange = 'BT' THEN
oppsclause := 'AND d1.TOTAL_AMOUNT BETWEEN :V1 AND :V2';
WHEN oppsRange = 'ALL' THEN
oppsclause := 'AND';
END CASE;
DBMS_OUTPUT.PUT_LINE(oppsRange || oppsclause);
OPEN tot FOR
'select DISTINCT a1.SALESREPID, d1.lead_id, d1.total_amount, d1.status from EMCSV_R25_DIST_PROF_TBL a1,
jtf_rs_resource_extns b1,
as_accesses_all_all c1,
as_leads_all d1
where a1.userid = :V1 and
b1.resource_id = a1.SALESREPID and
c1.PERSON_ID = b1.SOURCE_ID and
d1.lead_id = c1.lead_id' || oppsclause || 'ORDER BY a1.SALESREPID'
using userID, oppsMin , oppsMax;
LOOP
FETCH tot INTO salesrep, leadID , opps_amount, opps_status;
EXIT WHEN tot%NOTFOUND;
DBMS_OUTPUT.PUT_LINE('Sales Reps ' || ' ' || salesrep ||
'leadID ' || ' ' || leadID ||
'Opportunity Status' || ' ' || opps_status ||
'Opportunity Amount' || ' ' || opps_amount);
END LOOP;
CLOSE tot;Hi
What's wrong with your solution?
I think easier to manage your solution than to develop a complete sql analyzer.
Ott Karesz
http://www.trendo-kft.hu -
Where is the output of analyze table name validate structure cascade
Hi,
database version:8.1.7.0.0
os :solaris 5.9
since i used to get ORA-00600: INTERNAL ERROR CODE, ARGUMENTS: [25012], [7], [39] and i need to validate the table and this table is very huge(200 gb) where will be the output generated if any error is there in table including indexes.
sql>analyze table event_t validate structure cascade;
Regards
PrakashHello Helios
sorry ,
I am using 10.2 and reviewing
http://docs.oracle.com/cd/B14117_01/server.101/b10759/statements_4005.htm#sthref4205
my quote is from this document. My question of an ideal case, when there is no block corruption
regards ,
Pavel
Edited by: Pavel on Oct 17, 2012 3:55 AM
Maybe you are looking for
-
My screen will no longer turn on, how do i reset my display settings on mac pro
Hi, i'm using a mac pro and cinema HD display, the display was usually set to using the power button on the side as an actual power button, i decided to change it to turn computer sleep mode on and off and it still worked fine whilst it was on, i the
-
Firefox opening with 2 plugin-container.exe
recently updated my flash to the latest and noticed a bit of slow down (this is an older computer) checked out my process and were as when i used to open firefox i would only get 1 firefox process and 1 Plugin-container.exe i was now getting those,an
-
Friends, Getting below error when i restart the server. <Dec 31, 2014 5:33:58 AM EST> <Warning> <Management> <BEA-141274> <Production mode has specified at the command line via the weblogic.ProductionModeEnabled system property. This system property
-
Opening or saving a pdf file from my email
I just got a new computer which operates using Vista. I get many emails with pdf attachments and when I try to open or save them nothing happens. The little window pops up which shows the file transferring but it never finishes. I am not computer sav
-
i have worked through all of the support suggested items and i cannot get evnets that are put on my Outlook calendar to go to my icloud calendar and therefore my ipad and iphone or vice versa with events put on my iOS devices. i want my staff to ent