Adaptive Query Optimization in Oracle Database 12c

Over the holiday period I finally decided to tackle the Adaptive Query Optimization stuff in Oracle 12c, which resulted in these articles.

Adaptive Query Optimization is really a collection of different features, hence the links page to bring them all together. Some of the features are just renamed and slightly modified versions of stuff from previous releases. Other bits are totally new. I’ve sat through a number of talks about this stuff over the last few years and the sound-bites make it seem quite obvious and straight forward. That’s because the individual pieces, for the most part, are quite straight forward. The trouble comes when they all start to interact, at which point things can get quite confusing. While I was doing the demos for the features, I had to chop and change quite a bit. Sometimes things didn’t happen when I thought they should. Other times things did happen when I thought they shouldn’t. I think much of it was down to my misunderstanding, but that just goes to show how tricky some of this can be… That’s without adaptive cursor sharing and SQL plan management thrown into the mix…

As I keep saying, these articles will probably get revised over time as I get a better understanding of this stuff. I have a feeling I won’t really get to grips with it until we are live on 12c for a number of projects and people start throwing real situations at me to investigate.




“a SQL” or “an SQL”?

This is an age old question and of course the answer depends on how you say “SQL”.

  • … a Structured Query Language statement…
  • … a Sequel statement…
  • … an Es Queue El statement… (I say it this way)

Different people say it different ways. Most of the time I don’t notice, but I just read something by another writer and kept seeing “a SQL …” and it was freaking me out. Then I realised I always write “an SQL …”, which reads “an sequel …” to some people, which sounds really stupid. 🙂

According to the Oracle docs it is sequel, so “a SQL …” is the correct way.

“SQL (pronounced sequel) is the set-based, high-level declarative computer language…”

The MySQL docs go the other route.

“The official way to pronounce MySQL is My Ess Que Ell (not my sequel), but we do not mind if you pronounce it as my sequel or in some other localized way.”

According to Wikipedia, it doesn’t matter either way.

“The original standard declared that the official pronunciation for “SQL” was an initialism: /ˈɛs kjuː ˈɛl/ (“es queue el”).[11] Regardless, many English-speaking database professionals (including Donald Chamberlin himself[37]) use the acronym-like pronunciation of /ˈskwəl/ (“sequel”),[38] mirroring the language’s pre-release development name of “SEQUEL”

If one of the designers can’t make his mind up, what hope to we have? 🙂

Anyway, when you are reading my stuff and you see “an SQL …” everywhere, it’s correct for the way I say SQL. 🙂



PS. All the other typos are just plain typos because I’m practically illiterate. 🙂

PPS. PL/SQL is a lot simpler as it is “a PL/SQL …” regardless of how you say it. 🙂

Update: The general consensus from comments, twitter and emails seems to be:

  • When you write it, it should be “a SQL …”, regardless of how you say it. Taking me back to school, Paul Steffensen said, “if it starts with a vowel it’s an, otherwise it’s a”. In my reply, I mentioned that “an Es Queue El …” does start with a vowel. 🙂 That being said, “a SQL …” goes with the basic written language, the sequel version and the full wording of the acronym, so it fits more of the cases.
  • If, like me, you say “Es Queue Ell”, you should probably say “an Es Queue Ell” when speaking, but still write it “a SQL …”
  • Andrew Taylor said, “just to be on the safe side I say *some* SQL.” Pure genius!
  • In many cases, you can probably reword the statement so the “a” is not necessary. This feels like a cop out, but it might be what I end up doing. 🙂

The Black Hole

I was re-watching Who’s Afraid of the Big Black Hole on YouTube and I got all nostalgic about the 1979 film The Black Hole. A couple of clicks on Google Play and I bought and watched it. Flippin’ awesome!

Considering this is 35 years old, it’s stood the test of time pretty well. There are certainly a few dodgy effects on show, but most of the film looks fine. This is post-Start Wars after all. There are some scenes where people can seemingly survive in space without spacesuits, but even that could be explained away based on the tech used by the main ship I guess. 🙂

We definitely need more space-based Sci Fi. Can I have Guardians of the Galaxy 2 and a new FireFly series please?