Create The World With Creativity
 
Welcome, Guest:Log in | Register | Information Center | Languages | Search | Tags | FAQs | Lite
There was a problem with the request. Check your permission or contact with administrator.




Your Ad Here

Grade this thread

  1/2  «1 2»
Quote Favorites Report
Starter:  Topic: : Slowly Running SQL Degrade Oracle Performance
R.Wang 
5 Stars
 

Info: Moderator Offline Male
From: Not Specified 
Posts: 329  
Digest 0  
Credits: 59
Money: 1746 $OraclePoint
Registered on 2007-04-20
ProfileProfile BuddyBuddy PMPM Reply Reply QuotesQuotes   1 F 
Slowly Running SQL Degrade Oracle Performance



This is a complete oracle performance diagnosis case in solving bad performance of oracle database.
[url=http://www.oraclepoint.com]bPmktz1znOraclePointhMz9HrEKo[/url]


It covers:
[url=http://www.oraclepoint.com]Daqj0pL1HOraclePointfsL8KajvK[/url]

1. How to use statspack report to narrow down the cause of problem?
2. Typical steps to figure out similar problem?
3. And, further discussion on relating internal machenism, histograms,
[url=http://www.oraclepoint.com]ZlADIM3HUOraclePointjLfOP66z6[/url]

   CBO Optimizer, hidden init parameters, dbms_stats, and so on.

See attached for PDF copy.
[url=http://www.oraclepoint.com]lAvsge4doOraclePointUDZfcBfgK[/url]

[Lasted edited on 2008-10-07 13:20 R.Wang ]



Text attachment: Case_SQL_slow.pdf (Size:145.56kb, Download times:52)


Tags: case 

2007-06-28 16:31
  Grade this thread
R.Wang 
5 Stars
 

Info: Moderator Offline Male
From: Not Specified 
Posts: 329  
Digest 0  
Credits: 59
Money: 1746 $OraclePoint
Registered on 2007-04-20
ProfileProfile BuddyBuddy PMPM Reply Reply QuotesQuotes   2 F 
difference between soft parse and hard parse



See what Tom said about "difference between soft parse and hard parse". 
[url=http://www.oraclepoint.com]ZRD0diNteOraclePointJiZuiLdFp[/url]


 for complete article.

[Lasted edited on 2007-08-23 14:48 R.Wang ]


2007-08-23 14:47
  Grade this thread
R.Wang 
5 Stars
 

Info: Moderator Offline Male
From: Not Specified 
Posts: 329  
Digest 0  
Credits: 59
Money: 1746 $OraclePoint
Registered on 2007-04-20
ProfileProfile BuddyBuddy PMPM Reply Reply QuotesQuotes   3 F 
Create Statistics without Histograms (AskTom)



You Asked
[url=http://www.oraclepoint.com]iUsmuNFvtOraclePointl6bBNfAqD[/url]

How do you actually create statistics without creating histograms? I know you can supply the auto or the actual number of buckets using the command in dbms_stats.

Is a bucket of 1 the same as no histograms? There is a disagreement (with me and another DBA) on the way to do this.
[url=http://www.oraclepoint.com]OZiX88IgIOraclePointlmy0LIrx3[/url]


thanks.
[url=http://www.oraclepoint.com]53onekFfxOraclePointkgdou4MI2[/url]



and we said...
[url=http://www.oraclepoint.com]JRYS3AG2LOraclePointPj9Id2wHW[/url]


ops$tkyte%ORA10GR2> create table t as select * from all_users;
[url=http://www.oraclepoint.com]WN3KxYocJOraclePointhoSYyjwGc[/url]

Table created.

ops$tkyte%ORA10GR2> column column_name format a15
[url=http://www.oraclepoint.com]xMU9c48kXOraclePointzWeMtrE5f[/url]

ops$tkyte%ORA10GR2> exec dbms_stats.gather_table_stats( user, 'T' );

PL/SQL procedure successfully completed.
[url=http://www.oraclepoint.com]di8nGl7eZOraclePointgRg9FtSDL[/url]


ops$tkyte%ORA10GR2> select column_name, count(*) from user_tab_histograms where
table_name = 'T' group by column_name;
[url=http://www.oraclepoint.com]MBvj1IDC2OraclePointvHvRkUOOa[/url]


COLUMN_NAME       COUNT(*)
--------------- ----------
[url=http://www.oraclepoint.com]1K6QqNwpSOraclePointg9VrKXctO[/url]

USER_ID                  2
CREATED                  2
USERNAME                 2
[url=http://www.oraclepoint.com]kxRcjYO10OraclePointiEN96Y4LF[/url]


ops$tkyte%ORA10GR2> select * from t where username = 'x';
[url=http://www.oraclepoint.com]G8uZdsvL3OraclePointIomWPanr0[/url]

no rows selected

ops$tkyte%ORA10GR2> select * from t where user_id = -1;
[url=http://www.oraclepoint.com]C71Ce6Pd1OraclePointoXBte0d4d[/url]


no rows selected
[url=http://www.oraclepoint.com]LopEwTqJiOraclePointHxQHzM82r[/url]

ops$tkyte%ORA10GR2> select * from t where created = sysdate;

no rows selected
[url=http://www.oraclepoint.com]3HLsviufCOraclePointu96NKj3OW[/url]


ops$tkyte%ORA10GR2> exec dbms_stats.gather_table_stats( user, 'T' );
[url=http://www.oraclepoint.com]L6fuCSBJIOraclePointNHA60HGs4[/url]

PL/SQL procedure successfully completed.

ops$tkyte%ORA10GR2> select column_name, count(*) from user_tab_histograms where
[url=http://www.oraclepoint.com]odZrNXnaiOraclePointMTwjfsEPv[/url]

table_name = 'T' group by column_name;

COLUMN_NAME       COUNT(*)
[url=http://www.oraclepoint.com]XQ6geCgaCOraclePointogviLO84b[/url]

--------------- ----------
USER_ID                  2
CREATED                 30
[url=http://www.oraclepoint.com]Vg34tLqSqOraclePointYX7KuNFRr[/url]

USERNAME                 2

[url=http://www.oraclepoint.com]IxILcp7A2OraclePointL9unTQfN0[/url]



[url=http://www.oraclepoint.com]q4SXSpTdZOraclePointhjrPreX48[/url]

Ok, so by default in 10g, Oracle uses size auto to gather column stats - that is, it looks at predicates you've used and the data in the columns and figures out what histograms to gather

If you don't want that, you can just get endpoints (one bucket - high and low values and number of values - this is useful stuff generally) by doing this:
[url=http://www.oraclepoint.com]C184B7noQOraclePoint5Kd52XMOq[/url]


ops$tkyte%ORA10GR2> exec dbms_stats.gather_table_stats( user, 'T', method_opt=>'for all
columns size 1' );
[url=http://www.oraclepoint.com]2iJRFs9UaOraclePointdsTauKYnM[/url]


PL/SQL procedure successfully completed.
[url=http://www.oraclepoint.com]UR2lMBEG3OraclePointcSHIKpRbv[/url]

ops$tkyte%ORA10GR2> select column_name, count(*) from user_tab_histograms where
table_name = 'T' group by column_name;
[url=http://www.oraclepoint.com]0aGa4ytUjOraclePoint5sNGDe8or[/url]

COLUMN_NAME       COUNT(*)
--------------- ----------
USER_ID                  2
[url=http://www.oraclepoint.com]9tx1LG9TQOraclePointnlsZlIfBC[/url]

CREATED                  2
USERNAME                 2
[url=http://www.oraclepoint.com]UuW4oFHvIOraclePointmsxTrgGis[/url]



Now, if you really really didn't want ANY column information, you could do this:
[url=http://www.oraclepoint.com]MgCcJoLjPOraclePointTEQWZBtSq[/url]


ops$tkyte%ORA10GR2> exec dbms_stats.delete_table_stats( user, 'T' );
[url=http://www.oraclepoint.com]yab8CKuV2OraclePointRbZAo6DHF[/url]

PL/SQL procedure successfully completed.

ops$tkyte%ORA10GR2> exec dbms_stats.gather_table_stats( user, 'T', method_opt=>'for
[url=http://www.oraclepoint.com]rSo7lsM9IOraclePointNrb5f2Vd4[/url]

columns ' );

PL/SQL procedure successfully completed.
[url=http://www.oraclepoint.com]fNOWfpwgTOraclePointrjawQtaMV[/url]


ops$tkyte%ORA10GR2> select column_name, count(*) from user_tab_histograms where
table_name = 'T' group by column_name;
[url=http://www.oraclepoint.com]JZTRnAshgOraclePointj40cZNqvt[/url]


no rows selected
[url=http://www.oraclepoint.com]WhPqPyHBEOraclePoint1cRLlqe4T[/url]

Note: The above entry was published at AskTom.

[Lasted edited on 2007-09-11 22:18 R.Wang ]


2007-09-11 22:08
  Grade this thread
R.Wang 
5 Stars
 

Info: Moderator Offline Male
From: Not Specified 
Posts: 329  
Digest 0  
Credits: 59
Money: 1746 $OraclePoint
Registered on 2007-04-20
ProfileProfile BuddyBuddy PMPM Reply Reply QuotesQuotes   4 F 
Similar Case of Query Performance Problem



The case study posting http://www.oraclepoint.com/topic.php?filename=312&extra=page%3D1 is also another good case for your information while you experience query performance problem.
[url=http://www.oraclepoint.com]l2CLuCnJQOraclePointU60rdPXsD[/url]


2007-10-15 13:18
  Grade this thread
R.Wang 
5 Stars
 

Info: Moderator Offline Male
From: Not Specified 
Posts: 329  
Digest 0  
Credits: 59
Money: 1746 $OraclePoint
Registered on 2007-04-20
ProfileProfile BuddyBuddy PMPM Reply Reply QuotesQuotes   5 F 
Tom: Bind Variable Peeking

This is a Tom's blog posting about "Bind Variable Peeking" at http://tkyte.blogspot.com/2007/09/tuning-with-sqltracetrue.html. Well explained.
[url=http://www.oraclepoint.com]uIVMZhyGCOraclePointrZhSQkeBm[/url]


adbrite
2007-10-18 16:45
  Grade this thread
  1/2  «1 2»



Similar Threads Forum Author Replies Views Last Post
My Practical Approach to Create Domain Index
Oracle Case Study R.Wang 0 438  2010-05-13 15:45
My Practical Approach to Create Domain Index
Oracle Database Administration R.Wang 0 231  2010-05-13 15:44
Duplicating Oracle Database with RMAN on Remote Server
Oracle Case Study R.Wang 0 343  2010-05-10 00:00
How to Change Character Set to UTF8 for Oracle Database?
Oracle Case Study R.Wang 0 386  2010-05-09 23:53
Use LogMiner to locate Archive Logs Flow
Oracle Case Study R.Wang 3 2101  2009-08-01 11:08

  Quick Response
Title:
Content:




Upload: Disable
Username:
Password:
  



Recommend to a friend Print Article Mode





 


Powered by BMForum Powered by BMForum 2007 5.6 RSS Feed  
Processed in 0.33874607 second(s),20 queries  
Top