Transcript

How Smart Scan Functions – Demo

I want to show you very briefly how offload Smart Scan or flow processing can actually function.

I’m working here just in the little demonstration Scott schema. I’ll enable auto tracing so that we can see the effect on execution plans, which will also show me whether offload processing is indeed possible.

So it’s a simple query. I’ll use a function here to check that to get offloaded as well as the column selection and the row selection and column projection. We’ll have a predicate.

Right. So there is the statement. It returned these three scalar values, as you would expect. How was this actually executed? There was a select statement, then it was executed, table access full. That’s the only way to run that statement given the index on that table because in the middle of this, we see the key word, “storage.” That key word tells me that this statement could indeed be offloaded to the storage tier. Furthermore, we see down here in the predicate information, “storage.” That key word again tells me that the row filtering could have been done by the storage tier.

So what happened is that the storage tier did not return every block of the empty* table to the database buffer cache, where my session would then have had to extract these values. All it returned to the instance was these three scalar values directly into the PGA of my server process.

Now, there’s also the initcap function there. Was that offloadable or not? There is a view “Read our SQL fm letter data,” and that will tell us for each function whether or not it can be offloaded.

So, just select its name, whether it’s offloadable. Declare offloadable as yes and put in a sort order as well, and we see that in the current release, there are 393 functions that can be offloaded. Which ones? All the typecasting functions, truncations, trims. These are functions that get executed millions of times an hour in many, many environments. Note here two particularly important ones, balloon filters. The offload capability for balloon filters allows us to offload joins or facts to dimension tables. Those two in star schemas can be offloaded.

The function I used was, in fact, initcap. Just for completeness, we’ll scroll through all of these and we’ll see that initcap itself is an offloadable function, and there it is along with many others.

There are two classes of function that cannot be offloaded, and those are the aggregation functions and the analytic functions. I mention them just for completeness. There’s an architectural issue there because aggregations and analytics potentially require access to all rows in the table. The row might be distributed across a cell.

So it’s a technical issue why they can’t be offloaded, but virtually, all other functions can be offloaded with terrific drops in CPU usage, and combining that with the reduction of data traffic into the instances will give us vast performance improvements.

×
Free Online Registration Required

The tutorial session you want to view requires your registering with us.

It’s fast and easy, and totally FREE.

And best of all, once you are registered, you’ll also have access to all the other 100’s of FREE Video Tutorials we offer!

 

×