Here’s a fun little experiment (I’m using Oracle 19.0 for this). First, let’s start off by creating a couple of tables. Cool! Now that we got our tables, let’s join them in a query and look a the plan. Here’s… Read More
Index Range Scan vs. Leading Wildcard
Can you use an index range scan with a LIKE if you have a leading wildcard in your expression? e.g. Most people would say “no” but, I actually found a way to “trick” Oracle into doing so using bind variables,… Read More
Oracle: Coding Around NULL Values
In Oracle, NULLs can complicate your code–a lot. Suppose, for example, you want to see if two different values are the same in a SQL query. You might be tempted to write something like this: The problem with the above… Read More
Calculating Scalar Subquery Cache Size
Whenever you have a scalar subquery in Oracle, there are a few different options that Oracle can use for executing the subquery. Oracle can either run the query once for each row returned by the records in the from clause.… Read More