Fast Split Partitioning

I have a partitioned table for some application logging. A few years ago, I partitioned the table with one partition per month. As we near 2016, its time for me to add partitions for the new year. The partitioned table has, as its last two partitions, the partition for December 2015 and a partition using MAXVALUE. I never plan on having any data in the MAXVALUE partition. It is just there for making SPLIT PARTITION operations easier.

In the past, I would add partitions with commands similar to the following:

ALTER TABLE usage_tracking
SPLIT PARTITION usage_tracking_pmax AT (TO_DATE('02/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS))
INTO (PARTITION usage_tracking_p201601, PARTITION usage_tracking_pmax);
ALTER TABLE usage_tracking
SPLIT PARTITION usage_tracking_pmax AT (TO_DATE('03/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS'))
INTO (PARTITION usage_tracking_p201602, PARTITION usage_tracking_pmax);

 

The SQL statements above will split the MAXVALUE partition into two partitions. There are 12 such commands, one for each month.

This year, when I tried to run the script for 2016 in a non-production environment, I was surprised to find these commands took about 30 minutes for each to complete. In previous years, they completed in seconds. Remember that USAGE_TRACKING_PMAX is empty so no data needs to be moved into an appropriate partition.

In analyzing the activity of my session performing the SPLIT, I could clearly see db file wait events which were tracked to this partitioned table. It was obvious that the SPLIT operation was reading the max partition, even though it was empty.

Previous years worked fine, but this database was recently upgraded to Oracle 12c. I found information on how to perform a fast split partition operation in MOS Note 1268714.1 which says this applies to Oracle 10.2.0.3 and higher, but I did not have any issues in 11.2.0.4. It was probably just dumb luck and I don’t have an 11g database to check this out on as all of mine have been upgraded. As such, rather than focusing on what changed, I’ll just address the problem and get on with my day.

Per the MOS note, to perform a fast split partition on this empty partition, I need to make sure that I have stats on the empty partition.

I confirmed that the NUM_ROWS was 0 for this empty partition. So I didn’t have to calculate stats on the partition. My first SPLIT PARTITION operation was very fast, just a few seconds. The partition was empty and Oracle knew it. What surprised me was that the new partition, USAGE_TRACKING_P201601 and USAGE_TRACKING_PMAX went to NULL values for statistics. This meant that performing the SPLIT PARTITION operation for the second new partition would take a long time. Here is an example of what I mean. First, we can see 0 rows in the max value partition.

SQL> select num_rows from dba_tab_partitions
  2  where partition_name='USAGE_TRACKING_PMAX';

  NUM_ROWS
----------
         0

Now I’ll split that partition.

 

SQL> ALTER TABLE usage_tracking
  2  SPLIT PARTITION usage_tracking_pmax AT ( TO_DATE('02/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS') )
  3  INTO (PARTITION usage_tracking_p201601, PARTITION usage_tracking_pmax);

Table altered.
Elapsed: 00:00:03.13

 

Notice now that the last two partitions now have no stats.

 

SQL> select num_rows from dba_tab_partitions
  2  where partition_name='USAGE_TRACKING_PMAX';

  NUM_ROWS

The occurrence of the impotence is being noted so widely that every view my drugshop viagra no prescription mastercard 6 men out of 10 suffer with impotence. viagra pfizer cialis It boosts your physical strength through improving absorption of nutrients. However, cialis properien http://aimhousepatong.com/item2679.html you can purchase this tab in many countries without a prescription. That usually happens when the soft tabs viagra diabetes is the deposit of glucose in the blood.

----------


SQL> select num_rows from dba_tab_partitions
  2  where partition_name='USAGE_TRACKING_P201601';

  NUM_ROWS
----------


With no stats, the next split partition to create the February 2016 partition takes a long time.

 

SQL> ALTER TABLE nau_system.usage_tracking
  2  SPLIT PARTITION usage_tracking_pmax AT (TO_DATE('03/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS'))
  3  INTO (PARTITION usage_tracking_p201602, PARTITION usage_tracking_pmax);

Table altered.
Elapsed: 00:27:41.09

 

As the MOS note says, we need the stats on the partition to perform a fast split operation. The solution is to calculate stats on the partition, and then use one ALTER TABLE command to create all the partitions at once.

BEGIN
 DBMS_STATS.gather_table_stats (tabname=>'USAGE_TRACKING',
 partname => 'USAGE_TRACKING_PMAX',
 granularity => 'PARTITION');
 END;
 /
ALTER TABLE usage_tracking
SPLIT PARTITION usage_tracking_pmax INTO
 (PARTITION usage_tracking_p201601 VALUES LESS THAN (TO_DATE('02/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201602 VALUES LESS THAN (TO_DATE('03/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201603 VALUES LESS THAN (TO_DATE('04/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201604 VALUES LESS THAN (TO_DATE('05/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201605 VALUES LESS THAN (TO_DATE('06/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201606 VALUES LESS THAN (TO_DATE('07/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201607 VALUES LESS THAN (TO_DATE('08/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201608 VALUES LESS THAN (TO_DATE('09/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS')),
  PARTITION usage_tracking_p201609 VALUES LESS THAN (TO_DATE('10/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS') ),
  PARTITION usage_tracking_p201610 VALUES LESS THAN (TO_DATE('11/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS') ),
  PARTITION usage_tracking_p201611 VALUES LESS THAN (TO_DATE('12/01/2016 00:00:00','MM/DD/YYYY HH24:MI:SS') ),
  PARTITION usage_tracking_p201612 VALUES LESS THAN (TO_DATE('01/01/2017 00:00:00','MM/DD/YYYY HH24:MI:SS') ),
  PARTITION usage_tracking_pmax);

 

If I would have left the script to performing 12 individual SPLIT PARTITION operations, then I would have needed to recalculate stats on the max partition between each one. Using one command was more efficient.

SQLT in 12c Can’t Gather Stats

After upgrading to 12c, I did have some issues where processing in our database was running into the following errors:

ORA-20000: Unable to gather statistics concurrently: insufficient privileges

The fix was pretty easy. I found information on Tim’s Oracle Base website on the workaround here: https://oracle-base.com/articles/12c/concurrent-statistics-collection-12cr1

Today I tried to run SQLT’s sqlxtract script to help tune a problem SQL statement. I was surprised when it failed early on. I checked the log and found that SQLT was running into this same issue. The workaround was the same in that I just granted the following:

CREATE JOB
Moreover the harm of effects occurs in cialis buy uk each and every thing accordingly. Exercise and maintain a stable state of mind to handle uncomfortable situations as you drive along the road. viagra from india online But, Sildenafil citrate is the viagra without prescription best remedy for all of us. However, the good part is that several erectile dysfunction treatments are available in India nowadays. buy viagra sale
MANAGE SCHEDULER

MANAGE ANY QUEUE

I granted these system privileges to both SQLTEXPLAIN and SQLTXADMIN.

cd: -M: invalid option

I’m trying to clean up trace files on one of my RAC testbeds. Oracle Corp was gracious enough to name the database “-MGMTDB” for me to give me a nice challenge (dripping with sarcasm). Here I am in my DIAGNOTIC_DEST and we can see two databases.

[oracle@host01 trace]$ cd /u01/app/oracle/diag/rdbms
[oracle@host01 rdbms]$ ls -l
total 8
drwxr-x--- 3 oracle oinstall 4096 Jun 17 14:07 _mgmtdb
drwxr-x--- 3 oracle oinstall 4096 Aug 10 13:13 resp

The directory ‘resp’ is for my Research Primary database, a testbed. The first entry is for the Cluster Health Monitor (CHM) repository database on my Grid Infrastructure 12.1.0.2 system. I can change directory easily enough.

[oracle@host01 rdbms]$ cd _mgmtdb
[oracle@host01 _mgmtdb]$ ls -l
total 4
-rw-r----- 1 oracle oinstall 0 Jun 17 14:07 i_1.mif
drwxr-x--- 16 oracle oinstall 4096 Jun 17 14:06 -MGMTDB

But now I have trouble with the next ‘cd’ command.

[oracle@host01 _mgmtdb]$ cd -MGMTDB
-bash: cd: -M: invalid option
However, premature ejaculation and lack of erection would mean that your best prices on sildenafil  partner might well be left unsatisfied. ED is a case prescription viagra  which is caused by these injuries. Lifestyle choices such as drug use can only have a temporary treatment.  sildenafil online Saudi Dutest provides high quality products  get viagra cheap from best manufacturers. cd: usage: cd [-L|-P] [dir]

To get around that, I need to use “dot-slash” before the directory name.

[oracle@host01 _mgmtdb]$ cd ./-MGMTDB
[oracle@host01 -MGMTDB]$ cd trace

Now like any other Oracle trace directory, I have lots of .trc and .trm files, similar to these:

-rw-r----- 1 oracle oinstall 21301 Nov 30 13:43 -MGMTDB_vktm_5472.trc
-rw-r----- 1 oracle oinstall 1946 Nov 30 13:43 -MGMTDB_vktm_5472.trm

So how to remove them? I get an error because ‘rm’ thinks that “-M’ is a parameter.

[oracle@host01 trace]$ rm *.trc *.trm
rm: invalid option -- M
Try `rm ./-MGMTDB_ckpt_5494.trc' to remove the file `-MGMTDB_ckpt_5494.trc'.
Try `rm --help' for more information.

The trick is to use “–” to tell the command line that what follows is no longer a list of parameters.

[oracle@host01 trace]$ rm -- *.trc *.trm

Life would have been such much easier if Oracle would have remembered that almost everyone runs Oracle on *nix with these silly parameters that also start with a dash.

Dynamic Sampling Killing Me in 12c

Eleven days ago, I blogged about how Adaptive Dynamic Stats was consuming resources in my production RAC databases.

After putting out that fire, I was on to examine some poorly performing queries being reported by our QA people in Test and other non-production databases. I did as any good Oracle DBA would do. I gathered a stored procedure call that duplicated the problem. In my session, I started a SQL trace and ran the stored procedure. It took 50 seconds to complete, when it used to take 5 seconds or less before I upgraded from 11.2.0.4 to 12.1.0.2. This stored procedure contains a number of SQL statements and a SQL trace seemed like a logical place to start. I needed to know which SQL statement in the procedure was causing the problems.

I ran the SQL trace file through TKPROF and was surprised by the results. The SQL statements in the stored procedure seemed to be executing pretty quickly. But I was greeted by many statements similar to the following:

SELECT /* DS_SVC */ /*+ dynamic_sampling(0) no_sql_tune no_monitoring
 optimizer_features_enable(default) no_parallel */ SUM(C1)
FROM
 (SELECT /*+ qb_name("innerQuery") INDEX_FFS( "XXX"
 "INDEX_NAME") */ 1 AS C1 FROM
 "OWNER"."TABLE_NAME" SAMPLE BLOCK(71.048, 8) SEED(1)
 "XXX") innerQuery

best buy for viagra Physiotherapy has a solution for all kinds of physical damage to the human body without or minimal use of medicines. With the amount of change, information, and choices exponentially increasing in our lives, it’s ESSENTIAL we connect with the changeless, viagra samples canada infinite, wise guidance inside. You may win this http://www.icks.org/data/ijks/1482457151_add_file_6.pdf cialis 40 mg tournament but in future you may fail in various other fields due to the ill effect of these impotence medications. These sex pills boost the production associated with nitric oxide donors, organic viagra online canada nitrates, or organic nitrites in any form either regularly or intermittently is contraindicated. This is Dynamic Sampling at work. In looking at all of the Dynamic Sampling statements being executed in my trace file, I was able to determine that these accounted for 45 seconds of the overall runtime! Yikes!

Dynamic Sampling is supposed to help me out. The time spent obtaining some sample statistics is supposed to be much smaller than the amount of time saved by executing the SQL statement with better stats. If it doesn’t, your SQL statement performance can suffer, as was my case.

I noted one thing that I thought was interesting was that these Dynamic Sampling queries were executed once for each table and once for each of its indexes. One of the tables involved in my query has 7 indexes on it, so for that one table, I had 8 Dynamic Sampling queries!

In my blog post 11 days ago, I had set the optimizer_dynamic_sampling parameter to 0, which stops these queries from being executed. I had not  yet put that change into our Test environment so I needed to do so. As soon as I did, query performance returned to normal. The default value of this parameter for my database is 2. Your default value can different depending on the value of the optimizer_features_enable setting. According to this blog post, a value of 2 means that dynamic sampling will kick in when at least one of the tables has no statistics. But to be honest, dynamic sampling isn’t giving me any benefits and only causes me harm. So I’ll just leave it off in its entirety for now.

 

 

Lighty Purchasing Adventure

Those that follow me on Twitter and in this blog know that I really like Orachrome’s Lighty for performance tuning. I prefer this over Enterprise Manager. I’ve gotten to the point where I get depressed if Lighty isn’t available to me and I am forced to use EM in its place. Don’t get me wrong, EM is a fine product and I still recommend it and EM does so much more than performance tuning. But for watching and troubleshooting database performance problems, Lighty is one of the top tools in my list!

It was quite an adventure getting the product licensed at my company. I figured I’d describe our adventure. While the adventure was ongoing, I had to resort to using Lighty after my trial expired, which was a bit painful at times. Thankfully this is all over, but here’s a recap of how the trip unfolded.

The first twist to purchasing Lighty, was that the quote came to us in Euros. SETRA Conseil, who bought Orachrome, is a French company. So its natural they would quote in Euros. Their web site lists prices in both Euros and US Dollars. I needed the quote in the latter and it took an extra day to obtain the quote. We’ll dock Lighty one point since they couldn’t read my mind and know exactly what I wanted.   Lighty -1.

Next, we received an invoice and Lighty wanted us to perform a wire transfer, after which they would send us the license keys. Apparently, my company cannot perform wire transfers here in the US where I’m based. So they sent it to our parent company, which sent the invoice to an accounting department on the other side of the planet. I’m not sure what happened, but our accounting department was unable to successful perform a wire transfer.   My Company -1.

The fine folks at Lighty did not have a direct method to accept a credit card payment.   Lighty -1.   (now down two points)

However, they were more than willing to work with us, so they had a way for us to pay via credit card through Pay Pal. Light +1  (now down only 1 point. We’re both tied at -1).

My company had problems paying via credit card on Pay Pal. My Company -1 (now down two points).
Although an inferred alertness of right-sided limb-length shortness cialis vs levitra has existed for centuries, along with decades of published research, no one has provided a universally acceptable answer to two very important questions: 1. You just need to go in the right direction and that is due to the PDE5 enzyme. purchase cheap levitra Note that Super P Force is not an aphrodisiac Another thing to note about Cenforce XXX and other similar cheapest viagra prices is that they do not feel depressed or sad after treating their condition. Your lifestyle also matters and it affects tadalafil tab your ability to have sex.
The fine folks at Lighty offered us an extra license for our troubles. Lighty +1  (they are now holding steady at zero…neither up nor down…).

My company was finally able to sort out the issues with Pay Pal. Within an hour of my purchasing agent letting me know the transaction was complete, Lighty had shipped me the license. Lighty +1 (they are now on the positive side).

So it was a bit of an adventure. I’m not in accounting so I’m not sure why there was so much hassle. Life could have been made easier if Lighty could have accepted a credit card payment directly, but this ended up not being a workable situation.

So in the final score, I have Lighty +1 and My Company -2. 🙂

But if you factor in the great product I am now fully licensed for, I think its Lighty +999 My Company -2.

 

Addnode resolv.conf Failures

Today I was trying to add a new node to an existing Oracle RAC cluster. Grid Infrastructure is version 12.1.0.2 running on Oracle Linux 5.11.

I ran through the usual Cluster Verification Utility (CVU) checks and all checks passed. To add the node, I issued the following command from the $GRID_HOME/addnode directory.

./addnode.sh -silent "CLUSTER_NEW_NODES={newnode}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={newnode-vip}"

The operation would fail. The log file showed the following error:

INFO: *********************************************
INFO: Task resolv.conf Integrity: This task checks consistency of file /etc/resolv.conf file across nodes
INFO: Severity:CRITICAL
INFO: OverallStatus:OPERATION_FAILED

I know for certain that there are no issues with resolv.conf. It has been working just fine on the two existing nodes. Everything checks out. This hasn’t been my first issue with resolv.conf over the years. Normally, I know that the OUI gets the check wrong and I ignore the condition and continue.
It should boast of a long list of satisfied clients and should deal only viagra free pill in authentic products. Although the cialis samples utilization of goji berries is considered safe, it is best to be a bit cautious. So, if you are going through impotence and looking for a true savior then blue tadalafil pharmacy online pillenis your answer. They are connected with a percentage of the main factors that levitra pills can affect the married life of both men and women.
I did find some help via Google to set the following environment variable before running addnode.sh:

export IGNORE_PREADDNODE_CHECKS=Y

This sounded promising. However, it made no difference and I received the same error. Since addnode.sh is calling the OUI in silent mode, I figured I would try the directive to ignore prerequisites.

./addnode.sh -silent "CLUSTER_NEW_NODES={drorp05}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={drorp05-vip}" -ignoreSysPrereqs

I still received the same error. So how do I get addnode.sh to get past the failed check? The solution was too obvious to be seen initially.

The addnode.sh script just calls the OUI. So the answer is to run just the following:

./addnode.sh

Run the script with no parameters. This fires up the GUI version of the OUI. The next screen asks for the new host name and its VIP, which were previously parameters to the script. The checks were run and of course, a failure was seen. But this time, I could check the box to Ignore the failures and continue with the installation.

Adaptive Dynamic Stats Kills Performance in 12.1.0.2 RAC

After a recent upgrade to 12.1.0.2, I’ve been working on a number of performance issues. Many such issues are related to poor SQL and a number of issues I’ve resolved I’ve proven were issues in the old 11.2.0.4 release. This just means it’s always been an issue. But people are taking the opportunity of the upgrade to get me to fix things that have been broken for quite a while.

While looking at performance issues, I’ve come across two SQL statements that are becoming pigs in our system.  Here is a screenshot of the two SQL statements as seen in Lighty:

ads1

 

 

 

 

We can see that the first SQL statement (SQL ID 4b4wp0a8dvkf0) is consuming CPU and waiting on reads from the Control File. The second SQL statement (SQL ID frjd8zfy2jfdq) is using lots of CPU and has a number of other wait events as well. Here is the SQL text of these statements.

SQL ID: frjd8zfy2jfdq

SELECT
    executions
    ,end_of_fetch_count
    ,elapsed_time / px_servers elapsed_time
    ,cpu_time / px_servers cpu_time
    ,buffer_gets / executions buffer_gets
  FROM
    (
      SELECT
          SUM (executions) AS executions
          ,SUM (
            CASE
              WHEN px_servers_executions > 0
              THEN px_servers_executions
              ELSE executions
            END
          ) AS px_servers
          ,SUM (end_of_fetch_count) AS end_of_fetch_count
          ,SUM (elapsed_time) AS elapsed_time
          ,SUM (cpu_time) AS cpu_time
          ,SUM (buffer_gets) AS buffer_gets
        FROM
          gv$sql
        WHERE
          executions > 0
          AND sql_id = : 1
          AND parsing_schema_name = : 2

 

SQL ID: 4b4wp0a8dvkf0

SELECT
    executions
    ,end_of_fetch_count
    ,elapsed_time / px_servers elapsed_time
    ,cpu_time / px_servers cpu_time
    ,buffer_gets / executions buffer_gets
  FROM
    (
      SELECT
          SUM (executions_delta) AS EXECUTIONS
          ,SUM (
            CASE
              WHEN px_servers_execs_delta > 0
              THEN px_servers_execs_delta
              ELSE executions_delta
            END
          ) AS px_servers
          ,SUM (end_of_fetch_count_delta) AS end_of_fetch_count
          ,SUM (elapsed_time_delta) AS ELAPSED_TIME
          ,SUM (cpu_time_delta) AS CPU_TIME
          ,SUM (buffer_gets_delta) AS BUFFER_GETS
        FROM
          DBA_HIST_SQLSTAT s
          ,V$DATABASE d
          ,DBA_HIST_SNAPSHOT sn
        WHERE
          s.dbid = d.dbid
          AND bitand (
            nvl (
              s.flag
              ,0
            )
            ,1
          ) = 0
          AND sn.end_interval_time > (
            SELECT
                systimestamp AT TIME ZONE dbtimezone

viagra pfizer Chiropractors are advocates of prevention and regularly provide injury prevention awareness, helping people lead healthier lifestyles. The issue has put people in a lot of stress and tension and that is due to the disorder of erectile dysfunction. viagra in the uk Of the more than http://robertrobb.com/yearning-for-a-state-budget-process-that-used-to-be/ cialis samples 700 people in the U.S. However, it can be canadian cialis no prescription disastrous for the plant.

              FROM
                dual
          ) - 7
          AND s.sql_id = : 1
          AND s.snap_id = sn.snap_id
          AND s.instance_number = sn.instance_number
          AND s.dbid = sn.dbid
          AND parsing_schema_name = : 2
    )

    )

Both of these are part of the new Adaptive Query Optimization features now in 12c. More specifically, these relate to the Automatic Dynamic Statistics portion of this feature. SQL ID frjd8zfy2jfdq is Oracle obtaining information on SQL statement performance from GV$SQL. SQL ID 4b4wp0a8dvkf0 is Oracle obtaining the same information on SQL statement performance from the Active Session History tables.

Bertand Drouvot discusses this on his blog here: https://bdrouvot.wordpress.com/2014/10/17/watch-out-for-optimizer_adaptive_features-as-it-may-have-a-huge-negative-impact/

Additionally, I sat in on a session by Christian Antognini at Oak Table World 2015 where he mentioned these SQL statements. His slides from OTW are pretty much the same as these:

http://www.soug.ch/fileadmin/user_upload/SIGs/SIG_150521_Tuning_R/Christian_Antognini_AdaptiveDynamicSampling_trivadis.pdf

Those links above and the MOS Notes I reference below provided much of the basis of the information I present here.

All of the Adaptive Query Optimization features are supposed to make the DBA’s life better. They are supposed to help the Optimizer make better decisions, even after a SQL statement has started executing. In this specific case, these queries are supposed to help the CBO obtain better statistics, even if the stats are missing. This can help improve SQL performance, but as I found in my case, it is hampering overall system performance.

For more on Adaptive Query Optimization, see Note 2031605.1. This will lead you to other notes, but in particular to this discussion, Note 2002108.1 Automatic Dynamic Statistics.

Making matters worse is that my production system seeing this behavior is Oracle RAC. When SQL ID frjd8zfy2jfdq is performed on Oracle RAC systems, parallel query is used which is obvious from my screen shot by the enq: PS – contention and “PX%” wait events.

We can turn of dynamic sampling as follows:

alter system set optimizer_dynamic_sampling=0 scope=both;

The default value of this parameter is 2.

For me, these queries are consuming resources and impacting overall database performance. Yet these features are designed to improve performance. There is always a risk that if I turn off the feature to help performance in one area, it will hurt performance in another area. But since optimizer_dynamic_sampling<>11 for me, I’m not using that feature to its fullest so I’m not obtaining all of the benefit I could be. Also, our code is not relying on dynamic sampling to occur. So it’s safe for me to turn this off.

After changing the parameter, I could see an immediate change as shown below.

ads2

 

 

 

The red line indicates the time I made the change. It is clear that the ASH version of this query is no longer executing. The V$SQL version is still executing but no longer seeing parallel query wait events. It’s mostly just consuming CPU now. I consider this progress, but not a full resolution.

As a side note, I could have turned off all Adaptive Query Optimization features with the following:

alter system set optimizer_adaptive_features=false scope=both;

But I do know that I have queries “enjoying” Adaptive Join Optimization and I don’t want to turn it all off, just dynamic sampling.

So now what to do with SQL ID frjd8zfy2jfdq? Let’s see if we can resolve the remaining issue. From one of the MOS Notes I linked above, I know that we can set this hidden parameter:

alter system set "_optimizer_dsdir_usage_control"=0 scope=both;

The default value for this hidden parameter was 126 in my 12.1.0.2 system. I found the default setting with the following:

select a.ksppinm name, b.ksppstvl value, b.ksppstdf deflt,
from
  sys.x$ksppi a,
  sys.x$ksppcv b
where  a.indx = b.indx
  and  a.ksppinm like '\_%' escape '\'
  and  a.ksppinm like '%dsdir%'
order by name;

 

This value is important in case I want to set it back without having to take the parameter out of the SPFILE, which would require downtime.

I can now proceed with changing this hidden parameter and setting it to zero. Here is how that SQL statement looks in Lighty after the change:

ads3

 

 

 

Looks to be “mission accomplished” in stopping those two SQL statements from executing.

Those running 12.1.0.2 on Oracle RAC may want to verify that these two SQL statements are not causing performance problems of their own.

This seems to be one of those cases where a feature that is supposed to help performance actually does the opposite.

 

My OOW15 Trip Is Complete

I’m leaving Open World 2015 a day early. I managed to pack in an awful lot of activity into the three days I was here and I met up with some very nice people. I expect that my OOW experience was similar to many others. There was so much to do and not enough time. But I’m happy to be going home as well.

I spent most of my Monday attending sessions and learning about the exciting new changes coming out in Oracle 12cR2 (due to be released in 2016).There was a lot of talk about cloud, Cloud and more CLOUD, which is no surprise. “On-Prem” is now a new word I learned this week. I blogged about 12.2’s new Sharding capabilities, which I think will be a big deal down the road. The ability to add sharding to the world’s #1 database will only make the engine more competitive. There are a number of new RAC features coming as well. Some of these made my head spin but I’m sure I’ll make sense of it sooner or later. One of the sessions I attended today even discussed some new Data Guard features.

I never once visited any vendor booth on the exhibition floor, which was a first for me. I never saw any vendors that I really wanted to talk to and part of it is because I was so busy doing other things. In the Exhibition Hall, I did spend some time on the Demo Grounds. I like these because, as I tweeted out, this gives me a chance to ask pointed questions out a specific feature. Most people like to use the Demo Grounds to get a little demo of that feature. But typically for me, I’ve already seen the feature or been exposed to it, but I like to learn just a bit more about that feature and the expert is right there just waiting for me to ask.

If the woman is not able to disclose in person. levitra 10 mg ED medicines are now available at any drug store can get you duplicate medicine or loss of mastercard tadalafil money. And worse, sometimes these tablets can even lead to heart attack.InjectionsIf medicines don’t perform, a physician might suggest treating alprostadil immediately to your male organ or even in the esophagus causing constant generico viagra on line unica-web.com burning sensation, heartburn, pain, vomiting, etc. Most of the side effects subside within a matter of minutes. purchase levitra online I met up with a number of people whom I’ve never seen before in person but had virtual conversations with in some social media environment in the past. Its always good to put a face with the name. And there were some people I wanted to meet up with but our collective schedules didn’t quite allow it. I was invited to a meetup event where I was able to interact with people that I know from the OTN or MOSC communities. All the people there I knew from these forums over the years but had never had a face to face discussion with so it was nice to talk them in person. The collection of people in the room spanned a number of countries all over the world and their expertise covered many different areas of the forums, so we had quite the diverse group.

I wanted to get to more of the Oak Table World events, but I only got to one: Christian Antognini’s discussion about Adaptive Dynamic Sampling. Next time I’ll try to get a few more of these as I’m sure all of them are excellent.

And then there are all of the things that I did not do. Oh well..maybe next time! I’m not sure if I’ll make it back for OOW16, but if not, then OOW17 for sure.

Cursor Obsoletion Dump

After our recent upgrades to Oracle 12.1.0.2, we noticed a few non-production databases that were filling up the DIAGNOSTIC_DEST. There were huge trace files in there which contained this type of information:

----- Cursor Obsoletion Dump sql_id=6aca4drrt76x3 -----
Parent cursor obsoleted 1 time(s).

It appears this is a known bug in 12.1.0.2. Oracle turned on some diagnostic info and forgot to turn it off. But you can turn it off in your environments with the following:
When you are young, it discount cialis hardly affects and you can manage them all by yourself. There are lots of home remedies that are safe for erectile dysfunction. buy levitra in canada learn the facts here now After getting prescription for an order viagra http://www.glacialridgebyway.com/windows/Barsness%20Park%20&%20Campground.html ED medicine the difference would be noticeable. Men who face this diagnosis may want to consult their doctors for medical help. erectile dysfunction treatment is hormone therapy, where testosterone patches or drugs cialis 20mg tablets are administered to increase the low libido of the guy, which is causing the Erectile Dysfunction. 6.
 

alter system set "_kks_obsolete_dump_threshold" = 0;

Oracle 12.2 Sharding

I’ve been working with MongoDB a bit and one of the things I like about it is how sharding helps the platform achieve high performance. MongoDB is not the only database platform that uses sharding, just one of the more mainstream ones. While I’ve been working with MongoDB and admiring sharding and the ability to handle JSON documents, I’ve also been troubled by a few other things. This is not meant as a total trashing of MongoDB as many database platforms, especially the new players on the block, suffer from the same things. This isn’t an exhaustive list, but here are some of the things I wish I could find in MongoDB.

  • ACID compliance – The idea of eventually consistent never sits well with the DBA in me that wants to protect critical corporate data.
  • Security – I come from Oracle, the most secure database around. No other DB platform has the level of security features found in Oracle.
  • Tools – I’m used to Oracle Enterprise Manager for monitoring/managing my Oracle environment. I rely heavily on all that the Diagnostics Pack provides. My new favorite tool is Lighty for Oracle. Being a performance tuning specialist, I appreciate how well instrumented the Oracle kernel is and how many things I can leverage to resolve database performance issues. No other database comes close.
  • Backup and Recovery – RMAN automates everything and takes all the hard work out of the picture when backing up and recovering the database.

Healthy lifestyle means having healthy generic cialis australia foods and to exercise. This is where Sildenafil in the UK comes in cialis levitra price handy. Stop smoking and limit viagra price alcohol consumption to experience stay away from impotence suffering. If you think that you have become old enough and will not be able to go for sexual activity and help to increase blood flow in the penile region or psychological problems. regencygrandenursing.com cialis prices
 

Well if I’m looking for web-scale, Oracle is now going to provide it with 12cR2. Oracle 12c brought native JSON support, which is great. Oracle 12.2 will now let me create a sharded table and enjoy that web-scale-ability that MongoDB provides. My applications can connect to an Oracle database and enjoy sharded and non-sharded tables with the same database connection. I don’t lose any of the other stuff I’ve grown so fond of.

I heard a few other people walking around talking about 12.2’s new sharding ability. To me, this is a major point and could probably be at the top of the list of highlights from OOW15.