Wednesday, March 25, 2009

Oracle Cost Base Optimizer - getting sucked in

This Blog on the CBO, from the very Team at Oracle, gets a Hughe thumbs up from me!
The CBO is Truly Brilliant.
Oh Yes, it is.

Rant ?
me Rant ?
Never. I dont waste engergy that way.
Mind you, CBO is a worthy adversery when it comes to wasting energy. Especially after upgrades to 10g [link?].

Very Clever, the CBO.
The CBO will get it "mostly right in most of the cases" (famous quotation needed, but it is true). However those few cases where the CBO gets it wrong can really ruin your reputation.

I would always maintain that we paid Oracle to do the hard work for us, and I would not get sucked into doing arcane bespoke stuff with stats and hints and outlines and whatever to make a query do the bleeding obvious. Meanwhile, I spent hours tweaking all of the above, and reading near-scientific stuff trying to understand CBO just a bit better still. And now I finally got sucked in: I will join the ranks of those who have ranted presented on the CBO...

I must be careful here: Nobody ever got praised for pokeing fun at large vendors. The Real Application CBO is like those other Real Application Thingies: Oracle is Soooo Proud of it. No other database-vendor even comes close in ingenuity, in sheer intelligence, and in cunning engineering where query optimization is concerned.
So yes, I admit it, the CBO is Brilliant.
If it gets it right.

I did it again today:
A customer-meeting got sidetracked into "performance" and I spent 20 min explaining that when CBO made some seemingly inefficient decisions, it was not the CBO at fault. CBO tries as best it can. CBO will be using spfile-parameters, system-stats, object-stats, histograms, session-parameters, where-clauses, hints, outlines, and sql-plans and whatever other information it can glean from looking at the stars or tealeaves or whatever. So, if it is not the CBO at fault, it must be us, right ? We should have read the manual, the whitepapers, metalink, and followed the instructions available.

OK, real reason for this post: a plug for OUG Scotland.

I still need to write the abstract and the ppt, and wanted to aim it more towards efficient indexing, refer to Tapio and Richard Foote. Show CBO the obvious route (you can lead a clever horse to water) and it might just get it right... But my ppt will probably involve "how I fought the CBO".
Thomas already put up the title as a CBO related item...

These guys and many other good writers have basically said all there is to say already. And I am not qualified to tell you much on gathering stats or how to tweak parameters. Nor can I teach you about high-tech-hinting[link needed]. Others have done that before me, and did a much better job then I could hope to do.

I was hoping to offer some silver bullits, but even those tend not to work with the CBO. A Hammer is the next best simple-sophisticated tool I can think of...I know my limitations.

I am going to take as Simple an approach as I can.

Friday, March 06, 2009

In a crisis, you call the DBA

There is renewed demand for Real DBA skills.

And I now understand why.

In these stormy days, there is an increasing need for sober, simple and honest craftsmen (and women). Solid DBAs who know their job, who do not over-stretch or over-promise, and who can tell it like it is.

It really helps that Customers have no more patience for FUDdies and timewasters.
The vendors of over-complex, every-expanding, ever more costly contraptions are the first to go. Houses of cards cannot stand the storm. And the groupies that dont carry their weight get blown away with them: They add no value to Real Application Business.

In these Fearfull times, the demand for Uncertainty and Doubt is suddenly gone, and there is a need for Real Application Solutions.

Those who tried to boast their CV by implementing ever-more-misty FUD and "business" oriented layers of complexity are now finding a deaf ear. The Customer is too busy surviving, and their shiny layered contraption may have to go in the freezer, or down the drain. Simple Real Application Survival is more important.

I have always liked a good crisis.

A crises is when you call your DBA.

A crisis is the moment, the Opportunity, to solve some Real Application Problems.

And remember Professor Dijkstra:

"Simplex Veri Sigillum"
simplicity is the hallmark of truth.

Dijkstra then went on to state:
"Unfortunately, Complexity sells better"

Customers got wise.
Customers stopped buying!

And many sensible customers are actually using this so called "crunch" to reduce the complexity. The cold wind will blow away the chaff, and leave more room or serious, quality engineering.

Simple, solid and robust systems are de rigeur again. Real Application Simplicity.

Tip for salesmen: If you want to sell anything: try selling something simple.

PS: Thanks to a Miraculous friend for inspiring this blog! I hope his presentation went well, and I told him:
In case of doubt: Choose the more Simple solution.

Real Application Simplification is the word!

Thursday, March 05, 2009

Herding TOAD

You have to see the Fun side of this credit-crunch thing!

We had some great humour sprouting up inside our company when management went into cost-cut-panic. Hence the squeezed lemons.

And now this: A tech who turned maybe-manager and who will rationalize our TOAD license into "compliance".

Controlling Developers TOAD is like hearding Cats.
Actually, it is much harder then that!

(I think this was Pete Sharman's favorite line)

Here is an appropriate classic line by a Nerd from this 90s movie:

"The kind of control you are trying to exert is just not possible"

I am simply saying that Licenses eh Toads eh Life Finds a Way.

Luckily, the current office dinosaurs are not half as scary as the ones in the movie. But let me just check that My Green Friend is still legal, in case I get a spot-check on my laptop next week.

Never forget how a lean and mean american client, always brutally efficient, avoided to pay for a very complex and very bespoke report from the E-Business Suite:

"So, Who wants this report again? ... "

(....timid answer...., followed by a Grunt from the Boss)

"So what if we just get rid of him?"

Database wise, that is called Optimization by Elimination.
Funny that this client is still doing quite well...

Optimization by Elimination...
That reminds me of Dave Ensor...

My next Presentation on the Northern Server Tech Day might just be about Indexes, simple and advanced, and on what you can do if CBO doesnt "get it". Tapio and Richard Foote to the rescue.

Elimination is key. I'm still working on it.
Elimination of useless effort.
Elimination of Complexity.

Of course, I do not have the Definite answer to CBO headaches. 42, and some paracetamol may still be your best bet.

Update: Lisa and the folks at UKOUG have chosen to re-run my rather boooring presenation on "Is my Back(up) (re)covered ?". On the one hand I find it my most boooring presentation, but in the last 12 months, it has been The most asked-for topic I present on. I guess "Recovery" is even more of a fixation then the infamous CBO. I'll do a plug on the "Northern Server Day" later, but suffice to say York is a very nice town and the NS day is alsways a relaxed gathering of Oracle Professionals. Funny enough, there is a Scottisch DBA-SIG event the day after./

Anyway, one more about Rationalizing TOAD:

Respect to those who manage to ride this herd into town succsefully !


This is the footer...and this should be small text for disclaimers and the like. and some small stuff

Locations of visitors to this page And this text is placed next to the map. we could possibly hide some stuff here too for the benefit of the search-engines and if it is at color ffffff cam we put all sort of rubbish that we do not want readers to see. travel itinirary reservation ticket agent flight plane boarding attendant train connection rail ticket wait time booking flight boardingtime taxi ramp luggage suitcase trolley wheely laptop bagpack corpaorate wifi connection oracle. it will also be interesting to see what happens when this wrap around. or even if we put in spherus and worwood as additional word.