Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Friday, September 14, 2007

Oracle® Database 11g Running on HP with Windows Sets New World Record

Nifty! Oracle® Database 11g Running on HP with Windows Sets New World Record.

Oracle announced a new world record price/performance result with the TPC-C benchmark running Oracle® Database 11g on Windows. With this result, Oracle now holds the top two record benchmark positions in the coveted Top Ten TPC-C price/performance category. Optimized for small, medium and growing businesses (SMBs), the combination of Oracle Database 11g and Windows on an HP ProLiant server provides an ideal platform to meet these companies' individual business needs. This benchmark result further demonstrates Oracle's commitment to providing customers of all sizes unmatched price/performance and scalability.

"Out of the gate, Oracle Database 11g sets a new price/performance bar for the industry and it will continue to excel as it matures," said Juan Loaiza, senior vice president Systems Technology, Oracle. "This benchmark result furthers Oracle's commitment to SMBs, and our continuing promise to deliver on a long tradition of database excellence. SMBs that once thought Oracle was only for large enterprises need to take another look at Oracle Database."


Monday, August 13, 2007

Oracle Breaks Records With New TPC-C Benchmark

Running on an IBM System p 570 with two dual-core 4.7 GHz POWER6 processors, Oracle Database 10g Release 2 achieved 404,462.54 tpmC (transactions per minute) with a price-performance ratio of $3.50/tpmC -- a record achievement in 4-core performance.

"This TPC-C benchmark result, as well as those from the recent two-tier SAP SD Benchmarks, reinforces Oracle Database 10g's performance and scalability leadership," said Juan Loaiza, Oracle Senior Vice President Systems Technology. "It also demonstrates that Oracle Database takes full advantage of advances made in servers like IBM's p 570 to continue providing customers with unprecedented performance and scalability."

I wonder what 11g will do?

LewisC



Thursday, July 26, 2007

The Oracle Cost Based Optimizer: A Webinar

Earlier today, I attended a webinar by Hotsos. The webinar, titled Cost Based Optimizer: 1 of 2, was a basic introduction to the Cost Based Optimizer (CBO) in Oracle and the 10053 trace file. The CBO optimizes SQL queries and that optimization can be seen in a 10053 trace. It was not, what I would call, an advanced webinar but was done with plenty of examples and was very accessible for new comers to performance tuning. The webinar was given by Hotsos employee, Mahesh Vallanpati.

Because the webinar was filled with plenty of examples, it doesn't lend itself to a blog post. I'm pretty sure they said an archive of the webinar would be available on the Hotsos site. I did take some notes though so here are a few things that do lend themselves to a blog post. If any of this is wrong, it is probably a typo on my part.

The CBO is a complex, mathematical based optimizer. The CBO was introduced in Oracle 8, was improved in 9 and replaced the RBO completely in 10. While the CBO is driven by statistics many things affect it:


  • Database Parameters

  • Database Statistics

  • CPU and I/O Stats

  • DB Schema Configuration

  • Stored Outlines

  • The SQL Code Itself

  • The Oracle Query Cost Model (based on DB version)

Statistical data points collected by the CBO include (you can get this from the columns in stats data dictionary views):

  • Table Statistics


    • Number of rows

    • Number of blocks below the high water mark

    • Empty blocks

    • Average free space

    • Row length
  • Column Statistics


    • Distinct Values (very important)

    • Density

    • Low Value

    • High Value

    • Histogram values if they exist



    Note: If you use a default date rather than null, make sure your date is not way off base as that may skew the optimizer

  • Index Statistics


    • Clustering

    • Depth of index

    • Leaf blocks

    • Distinct Values (very important)

    • Other averages



  • System Statistics


    • Average Block Read sizes (multiblock and singleblock)

    • CPU Speed

    • I/O Speed

    • Table Statistics

    • Table Statistics




Note: The frequency and % of stats collected should not be a drag on the system. You need to evaluate just what % makes the most sense as well as how frequently you need to collect them.

Less logical I/O is not always better. In the session, Mahesh went over an example where, due to the dbfile_multi_block_read_count setting of 16, a full table scan with a LIO of 722 was actually chosen by the optimizer in lieu of an index scan with a LIO of 166. That means that in a full table scan, Oracle was reading 16 blocks at a time. By reading that much data at once, Oracle was actually getting more data faster than it would have by reading the index sequentially. Had the parameter been set at 8k, the index might have had better performance. Very nice detail.

One good tip that Mahesh provided is: The first step of your statistics gathering should be to backup your old stats. That way you can recover if something goes wrong.

Finally, Mahesh talked about a hint that I did not know existed, the CARDINALITY hint. Using the cardinality hint in a dev or test environment, you can test scalability when the amount of data in your tables grows. The hint tells Oracle that you have a different number of rows than you really have. You can run explain plans with various values and see how that impacts your plan.