• Oracle - performance - sql

    Finding the slowest SQL execution of the same query

    When running the same query multiple times, several questions come to mind: Does the query always execute in the same amount of  time? If some executions are slower, what is the slowest execution time? When did the slowest exectution happen? What more can I find out about the slowest exectution? All of this can be answered from data in Active Session History or ASH.   The following query finds the maximum, minimum and average execution times in seconds as well as the time of the slowest execution which is given by start time and end time of the  slowest exectuiton:…

  • Oracle - performance

    Oracle CPU Time

        Image from Bertrand Drouvot UPDATE: thanks to a discussion in the comments it’s come to my attention that there should be some more clarification on values used and what the mean at the beginning of this post. Ever wonder where CPU wait comes from in EM performance screens as seen above? well the following discussion will give you a SQL query to calculate CPU wait. In the above image we see both CPU and CPU Wait as two colors (light green and dark green) in EM as well as two values from the output of the SQL script (CPU_ORA and…

  • Oracle - performance - wait events

    Where to begin with Oracle and SQL

    Seeing more and more questions on “where do I start with Oracle if I want to be a DBA?”  My perspective is a bit off since I’ve been surrounded by Oracle for over 20 years.  I hardly remember what it was like to start with Oracle and starting with Oracle now in 2013 is quite different than starting with Oracle in 1990. Here is my list and everything on this list is excellent. I’m sure I missed a few good ones, but maybe people can add them in the comments. Start with Oracle Docs, they are free and good! http://www.oracle.com/pls/db112/homepage…

  • Oracle - wait events

    Oracle time units in V$ views

    Oracle has a crazy mix of units of time in various v$ views seconds centi-seconds milliseconds microseconds Some are straight forward such as time_waited_micro, but what unit is “TIME_WAITED”  or “WAIT_TIME” in? For example v$session WAIT_TIME –  centi SECONDS_IN_WAIT – seconds v$session_wait WAIT_TIME – centi SECONDS_IN_WAIT – seconds v$system_event TIME_WAITED – centi AVERAGE_WAIT – centi TIME_WAITED_MICRO – micro v$system_wait_class TIME_WAITED – centi v$eventmetric TIME_WAITED – centi v$waitclassmetric DBTIME_IN_WAIT – “percentage of the measured wait time that was actually in foregrounds and therefore part of DB time” * TIME_WAITED – centi v$waitclassmetric_history DBTIME_IN_WAIT – “percentage of the measured wait time that…

  • Oracle

    Exadata Can’t Fix Your Temp Problem

    Post a recent migration to consolidate a number of new databases to one of my client’s Exadatas, I found myself staring at a familiar wait event on one of them that I run into way too often when hopes of Exadata migration performance glory is reviewed.  Where, with all the features that are available to the consolidated database to perform more effectively on Exadata, Temp usage just isn’t one of them. Many know that I’m a proponent of ensuring design and code is as efficient as possible to not “over run” PGA allocation per session and “swap” over to temp.…

  • Oracle

    Passive-Aggressive Dynamic Sampling CBO with 11.2.0.3.0

    Didn’t know that was the name of a little know feature in 11g, eh? OK, so I may have named it that, but this is where I’m at right now with dynamic sampling at many of the shops I’ve worked at.  I know it’s due to the common sizes and types of databases I’ve worked on, too.  Many of them have unique hybrid databases that require unique solutions. These databases often have both transactional and ETL processing/reporting, along with adhoc queries from GUI tools.  For best results we’ve implemented the following in most of them: 1.  Throughout ETL loads, I work…

  • Oracle

    Post Redgate Webinar on Database 12c Pluggable Databases

    Thanks to everyone that tuned in for Redgate’s All things Oracle Webinar I did on Database 12c today.  I know we went way over on time and appreciate everyone staying on for the extra time as we went through and demo’d how many ways we can create, copy and clone DB12c pluggable databases. As promised, here’s the demo playbook and the links to the Virtualbox image with the DB12c installation files on it.  You will need to do the following to set everything up: 1.  Set the host name in the /etc/hosts file, (in case you want to rename your…

  • Oracle

    Redgate Webinar July 17th “Plugging in: Oracle Database 12c Pluggable Databases”

    I will be presenting another webinar with my good friends at Redgate this Wednesday, July 17th on the new Database 12c feature, Pluggable Databases.  This session will be one hour, but will include a live demo on the pluggable database feature. Seats are limited and I know in just one week, over 500 have already registered, so if interested, register here! See you on Wednesday and thanks!

  • Oracle

    Oracle Pluggable Databases- Easy as Pie, DBCA Pie, That Is…

    So for those of you that aren’t going to be “deep diving” soon, there will be two interfaces for creating a pluggable database-  a GUI or through a CLI and for many, the former is going to be the choice as we ascend into DB12c land. Many are still asking why we even want to go the pluggable database route, “What’s all the fuss?”  The concept is easy for any MSSQL DBA to comprehend-  they’ve had a lot of the feature set in place for quite some time as we detached and attached SQL Server databases since version 7. So what…

  • Oracle

    Adobe FlashPlayer with Firefox When Setting up EM Express for DB12c

    As we all know, it’s always the little things that come back to bite us when we are working with our own VM setups.  I’m using the newest Oracle Virtualbox 4.2.16 and have been quite happy with my new Linux6 installation.  I configured my listener and was ready to work with EM Express, but when logging in, received the error that I needed Adobe Flash Player to proceed. Strange thing was, I was quite aware of this and had already updated it.  Just for the fun of it, I tried again, and was told that it was already installed…which means…

  • Enterprise Manager - Oracle

    Database as a Service

    The idea of providing databases as a service to customers and companies can be a very foreign idea to the database administrator.  The DBA’s job is to carefully control and dole out resources.  The concept that “in the cloud” the user can just “order up” a database on demand is a difficult one. How does it work? Infrastructure First, the a cloud-based Paas Infrastructure zone must be created.    Without this, the plug-in for the “database as a service” will function.  Once this is setup, then the “Database for a Service” can be completed. The DBA must create a couple users for…

  • Oracle

    Repeat Performance

    How many performance specialists have experienced projects where reporting was horrid in the beginning, maybe didn’t even complete?  The focus of the project may have sat with data loads or due to the data architect’s design specialty, etc., the reporting aspect was just the last thing on everyone’s mind until it was too late. I come into this conversation with companies all the time and it is a difficult one, as there are so many database myths. “Can’t you just do something to make the database go faster?  I don’t know, isn’t there a parameter that can be updated, maybe…

  • Oracle

    Checking the Health of an Ethernet Cable on Exadata

    Exachk does a number of health checks.  One of them is to verify the connectivity, settings and such of the ethernet cables in the Exadata environment.  If one is found amiss, the following will be returned in the Exachk summary report: FAIL OS Check One or more Ethernet network cables are not connected. Node_Name To validate the Exachk findings, you are asked to run the following as root on the specific node that is reporting the issue: for cable in `ls /sys/class/net | grep ^eth`; do  printf “$cable: “; cat /sys/class/net/$cable/carrier; done This command, if run on one of the…

  • Oracle

    RMOUG 2013, The Conference Director Perspective

    There have been some great blog posts from folks on the RMOUG Training Days 2013 Conference, (I’ll add some links to my favorites I’ve come across at the end of this post!)  Due to this, I thought I would leave mine in my drafts folder and focus for now on the Conference from my viewpoint as the Conference Director.  John Juenette was gracious enough to send me a beginning blog post he’d started last year and I need to review it and add my own data for future “victims”, but until then, here were my experiences during this year’s run…

  • Oracle

    Exadata Optimization Tips

    As I spend more and more time optimizing Exadata environments, I seem to be answering the same questions repeatedly when it comes to database design, parameter settings, etc. Here’s a few high level notes to always remember- Always have baselines from previous environments.  Don’t go into performance expectations blind.  Have AWR and ASH data from the previous environment and mine AWR data for anything when others start “guessing”. Look at the big picture-  those that focus on one thing, often find that it’s a combination of issues that brew the perfect storm. What are your top 10 goals by going…

  • Oracle

    What “Makes” History

    While at conferences, I attend a lot of dinners/social events outside of the day time festivities and although the topics on the table are often technical, sometimes they veer off to those of each person’s interest.  Discussions with me often fall into one of my areas of interest, which happens to be history, (American, European or Russian…)  Many who know me realize that if I hadn’t ended up in the technical world, I might have become a history teacher.  The common question during these conversations is “Who is your favorite American president?”  When I answer “Andrew Johnson”, I always get…

  • Oracle

    RMOUG 2013, All the Glory, Half the Calories of Other Conferences!

    I’m always taken aback how much conferences cost, even if they are way cheaper options than many formal classes.  Education costs money, we all know that, but considering how little it costs to attend RMOUG Training Days, I always tell people, this is one of the best training opportunities anyone can take advantage of. I need to remind folks of some of the highlights of this great conference that I am very proud to be the Training Days director of.  This year you have new speakers like Oracle Open World’s Technologist of the Year, Arup Nanda along with so many…

  • Oracle

    Enkitec E4 2013 Abstract Submissions are Open!

    If you know Exadata and you want to present with the best of the best on the subject in one of the more exclusive and fun conferences around, come join me at the Enkitec E4 2013 conference in Irving, Tx this August 5th and 6th! This is your chance to share your Exadata knowledge with attendees who goal is to learn new Exadata skills.  Last years conference was incredibly successful and had an A+ list of presenters and attendees. To find out more and to keep up to date with the latest news on the event, check out Enkitec’s E4…