Search

OakieTags

Who's online

There are currently 0 users and 20 guests online.

Recent comments

Affiliations

Oracle

Indexing LOBs

Many years ago, possibly when most sites were still using Oracle 8i, a possible solution to a particular customer problem was to create a function-based index on a CLOB column using the dbms_lob.getlength() function call. I can’t find the notes explaining why this was necessary (I usually have some sort of clue – such as the client name – in the script, but in this case all I had was a comment that “the manuals say you can’t do this, but it works provided you wrap the dbms_lob call inside a deterministic function”).

Index Compression – aargh

The problem with telling people that some feature of Oracle is a “good thing” is that some of those people will go ahead and use it; and if enough people use it some of them will discover a hitherto undiscovered defect. Almost inevitably the bug will turn out to be one of those “combinations” bugs that leaves you thinking: “Why the {insert preferred expression of disbelief here} should {feature X} have anything to do with {feature Y}”.

Here – based on index compression, as you may have guessed from the title – is one such bug. I got it first on 11.1.0.7, but it’s still there on 11.2.0.4 and 12.1.0.1

EM12c Creating a New Agent Registration Password

I know, I know… Just answering questions that I keep receiving from folks repeatedly, so if you know this one, love ya, if you need this answer, here it is! :)

Proper Resync of an Agent

When an agent reports that it’s blocked and needs to be resync’d, most DBAs are going to log into the Enterprise Manager 12c console and attempt a resynchronization to have it fail.  A resync isn’t required very often, but if you do run into “Agent Blocked”, here are the initial steps that should be performed to have a resync complete successfully.

Averages

Recently while observing AWR reports, I’ve seen a very good example of how average value hides important pattern.

Here is a Workload Comparison section from an AWR diff report (generated with $ORACLE_HOME/rdbms/admin/awrddrpt.sql):

OTN Yathra 2014 : Noida

I woke up today feeling a little dodgy and for a moment I thought it would be a repeat of my morning in Jalandhar. Fortunately, once we got moving and I drank some really sweet tea, everything was OK.

Today’s event was based at the Sharda University in Noida. We were introduced to the crowd, presented with some flowers and lit a ceremonial lamp to mark the start of the event.

I attended Aman Sharma’s presentation on Oracle Certification and the ACE Program. The students are very job-focused, so they were interested in certification and also what opportunities were available in the community.

OTN Yathra 2014 : Jalandhar

Day one did not start well. I woke up and couldn’t stop throwing up. I got to the Lovely Professional University, thinking it would stop, but it didn’t. The people at the University were really helpful and took me to the University doctor, who gave me an injection to stop the nausea. A few minutes later, things calmed down, just in time for my first session…

As soon as I hit the stage I felt fine and the session went well. Adrenalin is a wonderful thing! After the session I started to flag a little, but I was taken to get some food, which picked me up. India is a great place for a vegetarian. I was a little nervous about eating after the events of the morning, but the food was great and I felt much better after it.

OTN Yathra 2014 : The Journey Begins

It’s been a really tough lead up to this tour. I’ve already blogged about the panic over my visa and flights. Since that post my flights were cancelled, switched to some different flights, then switched back again. I only got the final confirmation on the Thursday night before leaving on the Sunday.

What with that and me stressing out about some stuff going on at work at the moment, I felt like cancelling so I could lock myself in my house for 2 weeks and not speak to anyone. I’m in definite need of a holiday!

Today started off with a last-minute shop for a new suitcase. I had forgotten mine was broken, so I rushed out and bought the first thing I saw. I got home, packed, then got a banging headache. I had a couple of hours before my taxi, so I went to bed to try and sleep it off.

Recursive subquery factoring

This is possibly my longest title to date – I try to keep them short enough to fit the right hand column of the blog without wrapping – but I couldn’t think of a good way to shorten it (Personally I prefer to use the expression CTE – common table expression – over “factored subquery” or “subquery factoring” or “with subquery”, and that would have achieved my goal, but might not have meant anything to most people.)

If you haven’t come across them before, recursive CTEs appeared in 11.2, are in the ANSI standard, and are (probably) viewed by Oracle as the strategic replacement for “connect by” queries. Here’s a simple (and silly) example:

12c Subquery Factoring

From time to time I’ve posted a reminder that subquery factoring (“with subquery”) can give you changes in execution plans even if the subquery that you’ve taken out of line is written back inline by Oracle rather than being materialized. This can still happen in 12c – here’s a sample query in the two forms with the result sets and execution plans.  First, the “factored” version: