Skip to Main Content

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Balasubramanian.

Asked: October 11, 2010 - 6:36 pm UTC

Last updated: June 05, 2012 - 1:10 pm UTC

Version: 9.2.0

Viewed 10K+ times! This question is

You Asked

Hello Tom,

This is my first request here though i have been a regular reading your blogs.

I do not want to ask any technical questions as such without understanding the internals but would you suggest me the best book to understand about the system events comprising details about latches/enqueues (in detail) or a book that helps me to understand on reading/analyzing the statspack report please?

I will come up with questions to you later if am stuck somewhere.

Thanks n advance.
Bala



and Tom said...

I would say it would be the concepts guide and the performance guide themselves. They are freely available here:

http://www.oracle.com/pls/db112/portal.all_books


specifically:
http://docs.oracle.com/cd/E11882_01/server.112/e16508/toc.htm
http://docs.oracle.com/cd/E11882_01/server.112/e16638/toc.htm

The reference guide is very handy as well - statistics/enqueues are defined there:
http://docs.oracle.com/cd/E11882_01/server.112/e17110/toc.htm


don't get too bogged down in "details about latches/enqueues" - all we really need to know is that they are serialization devices - we don't need to understand their implementation - just that they exist and their presence indicates that we have some amount of serialization going on - and that inhibits our scalability.

Rating

  (8 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

version 9.2.0

Sokrates, October 13, 2010 - 3:18 am UTC

the question was on version 9.2.0 and you gave him links to 11.2 documentation
didn't you notice his version or was this on purpose ?
Tom Kyte
October 13, 2010 - 7:05 am UTC

I always point to the most current version of the documentation when someone says "learning".

The 11gr2 concepts guide is better than 9ir2

Same with the application developer guide and so on. The documentation in 11g is improved over earlier releases.



Tom Kyte books are better for me than Oracle Docs for learning.

Dana, October 13, 2010 - 10:46 am UTC

I have both the Oracle Docs on PDF and several Tom Kyte books, and miscellaneous others. The first source I look to when I'm stumped on an unknown is Oracle Docs. But far and away the most useful "learning" resource are books by Tom Kyte. Each section is linear, progressive, and approachable.

For statspack/awr, Jonathan Lewis has an excellent review on http://jonathanlewis.wordpress.com/

this is also a good book...

A reader, October 13, 2010 - 1:51 pm UTC

Apart from the list mentioned above..I found the book

Troubleshooting oracle performance ( Apres) very useful.It let you understand few things very cleary , has good examples as well.

Performance and locking

Allen, June 05, 2012 - 9:09 am UTC

I just lost another battle to MS SQL server so please delete the statement if I'm still feel burned.

************** Start of Post **************************

Tom you have said, I now belive, one should tune the tables for performance not the SQL. This approach is "release independent"

My thoughts are table layout, indexes, amount of data retrieved (index vs. covering index) determin first guess at good SQL. To be a bit funny the importance of SQL * (data access method / [disk layout {temp+log+index+data+RAID type} + data page]) determin if there is a problem.

Now there is another issue - the database one runs on. Here locking philosopy & options, "round robin" archive logging, index implementation, stored data size all make a difference. We just converted from ORACLE to another RDBMS. It does not matter which database for in each case these questions must be asked or they will be answered for you at "Go Live"

The new RDBMS has locking challenges. The data files grew by 150% due to how data types and indexes are physically kept. The vendor did the conversion so this is the optimal solution. The RDBMS does not use round robin redo logs but one big log requiring the customer to figure out how often to unload it to another file.

The battle lost was over cost vs. "what is the worst performance we can live with." While its easy for ORACLE and vendors to show ORACLE has fewer locking issues than other databases, the case may be decided on "is the system good enough so we can save a few dollars"

In my computer science based opinion: performance is not an expensive capitol investment in software, RAID-10 disks, highspeed networks, memory and machines. Performance is the avoidence of people waiting for the computer to respond. Yes an occasional report can be slow as long as the majority of users can move at their pace so they never feel like they are waiting.

These are my thoughts on performance and tuning. RDBMS, table structure and indexes determin data layout, memory, disk, RAID type and CPU power required. Mess up one of the first three and the problems start.

Kind regards
Tom Kyte
June 05, 2012 - 1:10 pm UTC

it should not have been lost on cost. Oracle SE (standard edition - comparable in feature set to MS SQL Server) costs just about the same. If you compare our EE (enterprise edition) to their "low cost" database - you are comparing apples and flying toaster ovens.


Alexander, June 05, 2012 - 2:15 pm UTC

I was curious about this myself, and from what I could find SQL Server 2012 enterprise edition is almost half as much per processor than Oracle 11g, $27,496 vs $47,500.

MS is tricky, they license per core but have a minimum 4 core license per physical processor at $6,874 a pop, if I'm reading this correctly:

http://www.microsoft.com/sqlserver/en/us/editions/2012-editions/enterprise.aspx

Oracle to SQL server

Allen, June 05, 2012 - 2:47 pm UTC

Tom,

Thanks for the response. SE and SQL2008R2 are fairly close in price until we get to VMWare. Here it was cheaper to license all the processors on the HP blades and run multiple VM machines for MS-SQL than just license two blades. The number of cores per CPU is now up from four to six (6). So using two blades for redundancy, only populating one socket on each blade, meant a min of 12 cores. That was a stumbling block. The number of cores is supposed to climb to eight or twelve next.

Even the ODA (ORACLE data appliance) where processors can be sectioned off did not make it. ODA is a great solution. It’s a worry free appliance where one, just one, company is responsible for everything. No chance of finger pointing. The Oracle rep was great in getting information, working out solutions and really trying to prove an ODA solution.

Another wrinkle is SDE (spatial database engine) used for ESRI's GIS system. We now have four (4) applications that are spatially aware. SDE license was harder to segregate.

Please run the numbers for SQL2008R2 RDBMS on two blades, two CPUs per blade with four cores on each CPU. I understand why VMWare is hard to license and will not argue.

BTW we did put ORACLE on a large VMWare blade system – legally. How? We have some “Per user lic.” left over from before the turn of the century -1998/99. Sadly they will also go away soon like Oracle 7.2.

I hope this post is not a career limiting move for me. If you email me I can get you some numbers. Even my ORACLE rep could not beat the pricing structure which is sad.


Alexander,

One interesting demo is to have three people log in and update a table in three different ways. This is possible in ORACLE but I have not found it in MS-SQL for there is an implied commit. It means nothing to an end user – just developers and DBAs

Always ask the vendor to spec SQL Server hardware. Do not be surprised if they put all the indexes and data into a single file on a single drive. Using ORACLE does make a difference. Educating people on the difference is getting more important – in my opinion.


RE:Allen

Alexander, June 06, 2012 - 8:38 am UTC

I'm not advocating for SQL Server at all; I was just pointing out that Tom mentioned the pricing was comparable, but from what I can find it's not even close.

RDBMS is part of performance

Allen, June 07, 2012 - 8:05 pm UTC

Alexander,

I agree about the price difference. IMO - Oracle is worth it.
Here is where I hear Tom ask "Where are the stats. Show me the numbers"
On two systems under the same version of Windows Server 2008 SP2 on the version of VMWare, the MS SQL 2008R2 64 Bit Enterprise edition needed index rebuilds more often. Data took up more space and locking is more of an issue.
There are reasons why vendors will specify one RDBMS overe another.
(sigh) My explination is not good enough for there are no times, I/O stats or explain plan information. Why? it is not a single SQL but a whole application system. Any one report, one SQL statement could be judged as "biased" to show ORACLE works better. Hence I defer to vendors.

To kick start performance start with or include the RDBMS. Push for a full test on "best candidates" to see, to prove, what the performance is.

DB2, ORACLE, MSSQL, PostGress, MySQL are not just "brand" names on the same code. They really do perform differently. Hopefully that counts.