How to find which query need to tuned
Hi ,
How can i find , which query need to tuned . Is there any mechanism behind it?
The mechanisms behind it are depending on your database version.
For example:
Oracle 9i has STATSPACK that helps you to identify possible problem queries.
Oracle 10g has AWR - Automatic Workload Repository
Oracle 11g has SPA - Database Replay SQL Performance Analyzer
but there are many more tools/mechanisms...trace/tkprof for example.
Go to http://tahiti.oracle.com and do a search on 'performance tuning guide', and pick the one that matches your (sofar unknown) database version, read a bit every now and then and see what tools are at your disposal and fit your requirement and situation.
Besides the links that Blu already posted, searches on http://asktom.oracle.com also give lots of pointers and explanations regarding the (neverending) tuning process (at least: helped me tremendously in understanding the tuning process, the do's and dont's).
Make sure you don't get CTD (Compulsive Tuning Disorder) from all this... ;)
Similar Messages
-
How to find which query taking more cpu
Hi,
How to find which query taking more CPU
at a particular point of time .
Chhers,Take a look at Server Standard Reports. It has a few CPU usage oriented reports.
You can also track CPU usage by server-side tracing:
http://www.sqlusa.com/bestpractices/createtrace/
Glenn Berry's CPU usage query:
SELECT TOP(25) p.name AS [SP Name], qs.total_worker_time AS [TotalWorkerTime],
qs.total_worker_time/qs.execution_count AS [AvgWorkerTime], qs.execution_count,
ISNULL(qs.execution_count/DATEDIFF(Second, qs.cached_time, GETDATE()), 0) AS [Calls/Second],
qs.total_elapsed_time, qs.total_elapsed_time/qs.execution_count
AS [avg_elapsed_time], qs.cached_time
FROM sys.procedures AS p WITH (NOLOCK)
INNER JOIN sys.dm_exec_procedure_stats AS qs WITH (NOLOCK)
ON p.[object_id] = qs.[object_id]
WHERE qs.database_id = DB_ID()
ORDER BY qs.total_worker_time DESC OPTION (RECOMPILE);
LINK:
http://dba.stackexchange.com/questions/52216/sql-server-2008-high-cpu-historical-queries
Query optimization:
http://www.sqlusa.com/articles/query-optimization/
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
How to find which query ORA-1652: unable to extend temp segment by 128 in
How can i find which query caused the below error,the query is not running currently
ORACLE ERRORS IN ALERTS LOG dnb2stg3 - lnx300 on Thu Jun 17 12:10:01 EDT 2010
1 ORA-1652: unable to extend temp segment by 128 in tablespace TEMP_SCHED
SQL> select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks from gv$sort_segment;
INST_ID TABLESPACE_NAME TOTAL_BLOCKS USED_BLOCKS FREE_BLOCKS
1 TEMP 638336 0 638336
4 TEMP 565760 0 565760
4 TEMP_SCHED 16776704 0 16776704
3 TEMP 484864 0 484864
3 TEMP_SCHED 0 0 0
2 TEMP 455808 0 455808
6 rows selected.
SQL> SQL> SELECT S.sid || ',' || S.serial# sid_serial, S.username,
2 T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace,
3 T.sqladdr address, Q.hash_value, Q.sql_text
FROM v$sort_usage T, gv$session S, gv$sqlarea Q, dba_tablespaces TBS
4 5 WHERE T.session_addr = S.saddr
6 AND T.sqladdr = Q.address (+)
7 AND T.tablespace = TBS.tablespace_name
8 ORDER BY S.sid;
no rows selectedHello,
You may try to catch the SQL with a Servererror Trigger.
This link will give you an interesting example:
http://oratips-ddf.blogspot.com/2008/09/to-err-is-human.html
Hope this help.
Best regards,
Jean-Valentin -
Hi,
I wanted to know how to find out which SAP query uses this program. AQ10MM==========Z6============
I tried with SQ01/02 but was unable to get it. Can you please help.
Regards,
Mukund SIn my installation , it is usually AQZZ"usergroup"========QUERYNAME======
You could see if you have a user group 'MM' or '10MM' in SQ03 and set the user group if available.. then in SQ01, see if you have a query called Z6
Also try out this function module RSAQ_DECODE_REPORT_NAME to see if it would give you the user group and query name... -
How to find bex query name of which dashboard built on?
How to find bex query name of which dashboard built on?
Hello,
When you add a "SAP BW Connection" to you dashboard, you find in the output parameters the query technical name and the query description. you can bind it to the embedded spreedsheet and then use it in yoyr dashboard
Best regards,
Mohamed AISSA -
How to find a query name from report name
I have a report in my system with the name AQICMM==========P2============ . I believe this was created from a query. How to find the query corresponding to this report ? I need to change the logic for certain columns of the report. How to know if this was created from SQVI or SQ01 or any other transaction.
THanks.Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM -
How to find which model of iPhone 5 I am using? and is that GSM or CDMA?
How to find which model of iPhone 5 I am using? A1428 or A1429 ? Is there any short code you can dial in and check the model number ?
And which is GSM or CDMA out of this model.If you purchased the phone in the US with an AT&T contract then you have the locked CDMA A1428 version of the iPhone 5.
At the moment and if the contract is a new contact, then you won't be able to get the phone unlocked at the moment and no, you won't be able to use it in your home country. You will also have LTE 4G compatibility issues too and your phone will only work on 3G and also you need to remember that iPhones are only covered by country specific warranty, so it is only covered in the US, so if you go home and then have a problem with your phone, you will have to come back to the US to get it repaired.
You need to approach AT&T about whether they will unlock your phone for you as they are the ONLY ones that can do it, but the answer to your question is no and if you had wanted to use your phone at home, then you should not have purchased it in the US. The best that you can hope for at the moment is to use it on international/roaming.
If you purchased your phone in the US, then it will be a CDMA phone. You don't have a GSM phone, but GSM phones are unlocked anyway and these are the ones that are selling in Canada and the UK.
If you have your phone on an AT&T contract then ultimately, AT&T are the only ones who can help you with any questions regarding unlocking and they are the only ones who can unlock it for you, noone else. -
How to Find the Query used by the Workbook ?
Hi ,
I am currently involved in trouble shooting a work book where some master data values are not being displayed.
How do i find, which Query the work books is using ? or Let me know as to how should i proceed in solving the same .Hi,
If you have access to BW Admin workbench... then choose the option metadatarepository(left side) of the BW admin workbench, search for the workbook(Technical name) and click on the "Network display dataflow" link.
If you want to know the relationship between workbook and the queries:
Check table RSRWORKBOOK which contains the WORKBOOKID and the GENUNIID.
Table RSRREPDIR contains GENUNIID, query name RNAME, AUTHOR, LASTUSER, INFOCUBE
Table RSRINDEXT contains the WORKBOOKID and workbook TITLE
You should join the tables by GENUNIID and select in RSRREPDIR the rows that have COMPTYPE='REP' for queries and object version active/modified.
With this information an infoset query can be created to list all workbook-query-user relationship (and even the query-infocube relationship).
Hope this helps u...
Regards,
KK. -
How to find which instance in the RAC cluster the application is connected
How to find which instance in the RAC cluster the application is connected to ?
Raeeswell if you know the user through which your application is connected to instance, you can easily find out by querying gv$session view.
select inst_id,sid,serial#,program,username from gv$session where username is not null;
Thanks
Gaurav -
How to find which version of JDK is loadjava using
Hi All,
How to find which version of JDK is loadjava using?
I am using Oracle : 9.0.1.5.1 and I need to use class javax.crypto.Cipher which is shipped with JDK 1.4.2, but loadjava is unable to import javax.crypto.*;
Any inputs would be greatly appreciated.
Thanks and regards,
AbbaAbba,
From memory only (since I haven't verified it), "loadjava" is a script, so you can have a look at its contents. I believe it actually uses JDK 1.1.8 (which is part of the Oracle installation). In any case, Oracle 9i is compatible with JDK 1.3 only.
Oracle 10g is compatible with JDK 1.4.
Good Luck,
Avi. -
How to find Which one is my Message Server in AIX with DB2
Hi SAP Guru's
PS1 is my Production system(R/3)
in this we have 5 Applications Servers
how to find which one is my Message Server/ Central Instance.
Note : Enqueus Reside in MainFrame Server
OS: AIX
DB: DB2
R/3: 4.7 620 Kernal Version.
you need more information Plz. let me know
I appriciate who gives more explanation
Thanks & Regards,
Kishore ReddyHi Ruchit,
cpaiss51 cpaiss51_PS1_06 PS1_D06_CPAISS51
DrainBatch 15 - - 3 5 1 - 24
Normal Operations 10 5 - 3 5 1 - 24
Specialbatch 10 5 - 3 5 1 - 24
THDNIGHTLYBATCH 10 5 - 3 5 1 - 24
cpaiss54 cpaiss54_PS1_06 PS1_D06_CPAISS54
DrainBatch 46 - - 3 5 1 - 55
Normal Operations 34 12 1 3 5 1 - 55
Specialbatch 34 12 1 3 5 1 - 55
THDNIGHTLYBATCH 34 12 1 3 5 1 - 55
cpaiss56 cpaiss56_PS1_06 PS1_D06_CPAISS56
DrainBatch 46 - - 3 5 1 - 55
Normal Operations 34 12 1 3 5 1 - 55
Specialbatch 34 12 1 3 5 1 - 55
THDNIGHTLYBATCH 34 12 1 3 5 1 - 55
cpaiss89 cpaiss89_PS1_06 PS1_D06_CPAISS89
DrainBatch 46 - - 3 5 1 - 55
Normal Operations 34 12 - 3 5 1 - 55
Specialbatch 34 12 - 3 5 1 - 55
THDNIGHTLYBATCH 34 12 1 3 5 1 - 55
cpaiss90 cpaiss90_PS1_06 PS1_D06_CPAISS90
DrainBatch 46 - - 3 5 1 - 55
Normal Operations 34 12 1 3 5 1 - 55
Specialbatch 34 12 1 3 5 1 - 55
THDNIGHTLYBATCH 34 12 1 3 5 1 - 55
Thanks & Regards,
Kishore REddy -
Hi all,
how to find physical query from report here m checking like Administrator->manage session--> report-->view log
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- SQL Request:
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- General Query Info:
Repository: Star, Subject Area: AAA, Presentation: AAA
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- Cache Hit on query:
Matching Query: Created by: Administrator
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- Query Status: Successful Completion
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- Physical Query Summary Stats: Number of physical queries 1, Cumulative time 0, DB-connect time 0 (seconds)
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- Rows returned to Client 6
+++Administrator:3220000:3220011:----2011/01/03 02:51:43
-------------------- Logical Query Summary Stats: Elapsed time 0, Response time 0, Compilation time 0 (seconds)
but here m not able to find database query..how to find that query plz help
Edited by: Sonal on Jan 3, 2011 5:29 AM
Edited by: Sonal on Jan 3, 2011 5:30 AM
Edited by: Sonal on Jan 3, 2011 5:30 AMHi,
as Daan said, set the variable in Advanced tab but not on loglevel..
because, our problem is to bypass the bi-server cache.
Do this:
1. Go to Advanced tab.
2. In Prefix field(scroll down to see this field) , enter this:
SET DISABLE_CACHE_HIT = 1;
Note: Make sure that you're ended up above statement with semicolon and do not click on Set SQL option...
3. Save report, then run it..
4. After you see the query, i recommend you to take take out that prefix tag then save it again.. -
How to find out query name using Elements of the query builder.
Hi SDNers,
how to find out query name using Elements of the query .
thanks,
satyaaHi,
For having a look at the relation between BEx tables,check the link below:
http://wiki.sdn.sap.com/wiki/display/BI/ExploretherelationbetweenBEx+Tables
-Vikram -
How to find the query name using infoset name
Hi Experts
Iam new to the sap queries(SQ01,SQ02), some queries already created.
now i want to do some modification, my problem is i am not able to find the query name.
I know the infoset name, can you tell me how to find the query name using the infoset name, is ther any table for this.
i tried in sq01 also, but its confusion, pls advice me on this.
thanks in advance.
regards
rajaramHi
try like this..
SQ02 --> go to --> Query Directory..
from there you can get all the queries belong to a Infoset. -
How to find which authentication used to site collection and site using powershell
Hi,
How to find how-many web app, sitecollection, site used Windows authentication,claim authentication and classic, secure store authention , adfs authentication using powershell code in sharepoint 2013.
If sites are used adfs authentication how to find which email id used for that.
Thanks,Authentication is only defined at the Web Application level, and the only valid auth methods are Classic (Windows (Basic/NTLM/Kerberos)), Claims (Windows (Basic/NTLM/Kerberos)), FBA Claims, , SAML Claims (ADFS), and Anonymous.
You can find out what authentication scheme(s) are enabled via:
$wa = Get-SPWebApplication http://webApp1$wa.IisSettings["Default"] #replace with the zone name you're interested in
The output will look similar to this:
PS C:\Users\trevor> $wa.IisSettings["Default"]
AuthenticationMode : Forms
MembershipProvider : i
RoleManager : c
AllowAnonymous : False
EnableClientIntegration : True
ServerBindings : {Microsoft.SharePoint.Admini
stration.SPServerBinding}
SecureBindings : {}
UseWindowsIntegratedAuthentication : True
UseBasicAuthentication : False
DisableKerberos : True
ServerComment : SharePoint
Path : C:\inetpub\wwwroot\wss\Virtu
alDirectories\spwebapp180
PreferredInstanceId : 42768054
UseClaimsAuthentication : True
ClaimsAuthenticationRedirectionUrl :
UseFormsClaimsAuthenticationProvider : False
FormsClaimsAuthenticationProvider :
UseTrustedClaimsAuthenticationProvider : False
UseWindowsClaimsAuthenticationProvider : True
OnlyUseWindowsClaimsAuthenticationProvider : True
WindowsClaimsAuthenticationProvider : Microsoft.SharePoint.Adminis
tration.SPWindowsAuthenticat
ionProvider
ClaimsAuthenticationProviders : {Windows Authentication}
ClaimsProviders : {}
ClientObjectModelRequiresUseRemoteAPIsPermission : True
UpgradedPersistedProperties : {}
So on this Web Application in the Default Zone you can tell I have Windows Claims enabled, not using Kerberos (so using NTLM), and Trusted (SAML/ADFS) is not enabled, neither is Forms or Anonymous.
Trevor Seward
Follow or contact me at...
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
Maybe you are looking for
-
Best Practice for Replicating Schema Changes
Hi, We manage several merge replication topologies (each topology has a single publisher/distributor with several pull subscriptions, all servers/subscribers are SQL Server 2008 R2). When we have a need to perform schema changes in support of pendin
-
This company is nearly impossible to communicate with! How can they continue to not address their inability to handle questions?
-
Hi all, In a report, I must change the cost center for Purchase Requisition and Purchase Order. In my opinion I must use the bapi: "BAPI_REQUISITION_CHANGE" and "BAPI_PO_CHANGE", but I don't know how to use. Is this correct ? If yes, can someone expl
-
Z C N M & SPACE don't work?!?!? HELP ASAP!
I did a wipe, backup, and have restarted it multiple times.. These buttons just don't work, and I don't know what to do! The water indicator on the phone itself is not red, but the one on the battery was? (if that is a water indicator at all, on the
-
Blue screen - can't use disc utility
My 2012 Macbook Pro won't start up and has a blank screen after doing the mac tune with the apple logo. I tried starting up with command R keys held down and then again with Option key held down to get to the recovery HD and then it gave me a blue sc