O'Reilly logo

Cost-Based Oracle Fundamentals by Jonathan Lewis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 6Selectivity Issues

So far, I have stuck with all the easy options. I've been using numeric data, avoiding nulls, generating nice data distributions, and taking half a dozen other routes to making the optimizer behave well.

However, there are numerous ways in which the arithmetic works as I've described but still produces results that look completely wrong. In this chapter, I discuss the commonest reasons why the standard selectivity calculations produce unsuitable answers, and how you can (sometimes) bypass the problem. I also discuss a couple of features that may cause the optimizer to apply the arithmetic to the wrong predicates.

In Chapter 3, I avoided going into details about histograms. I'm still going to avoid them here. The effects ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required