Top Queries in PL / SQL

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
bizoca
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Fri, 10 Oct 2008 11:27 am
Location: Sorocaba

Hi!

Personal, I have access to some instances in Oracle Enterprise Manager (Graphic Tool) to check the Snapshots of Top Viles in processes that run during the day at the bank. But a problem appeared on an instance where I do not have access via grid, and I need to know what the queries are high to try to improve them.
I would like to know if there is possibility of doing this through command lines in PL / SQL and which I can use to verify what is causing delay in the jobs.

Thanks !!!
bizoca
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Fri, 10 Oct 2008 11:27 am
Location: Sorocaba

So, to explain better, with the V $ session, I have the open sessions on the bank. I need a view that gives me the queries that has high consumption of resources. Anybody know?
bizoca
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Fri, 10 Oct 2008 11:27 am
Location: Sorocaba

Nobody knows??
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Topic Moved for DBA Forum!
(because it is a performance issues, etc.)
gilbertoca
Rank: DBA Sênior
Rank: DBA Sênior
Posts: 372
Joined: Tue, 24 Jan 2006 3:33 pm
Location: Palmas - TO
Contact:

Bizoca wrote: So, to explain better, with the V $ session, I have the open sessions on the bank. I need a view that gives me the queries that has high consumption of resources. Does anyone know?
You can run the ADDM through PL / SQL.
Your starting point [url=http://download.oracle.com/docs/cd/B193 ... htm#i36662]Running ADDM using DBMS_ADVISOR APIs

Another way is to check the moment the problem occurs and from there, harvest / analyze the bank through a pre-script -Defined: [url=http://download.oracle.com/docs/cd/B193 ... #sthref333]Diagnosing Database Performance Issues with ADDM

Gilberto
tapenatti
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 3
Joined: Thu, 04 Dec 2008 11:10 pm
Location: Rib. Preto / SP

I think this is:

Select all

select username usr, 
       a.disk_reads disco, 
       a.executions exec, 
       Round((a.disk_reads / decode(a.executions, 0, 1, a.executions)), 2) media, 
       a.Rows_Processed linhas,        
       a.sql_text sql 
  from v$sqlarea a, dba_users b 
 where a.parsing_user_id = b.user_id 
   and disk_reads >= 1000 
 order by 2 desc, 4 desc;
bizoca
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Fri, 10 Oct 2008 11:27 am
Location: Sorocaba

it worked out! ; D Much a lot Thank you !!!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests