Oracle NVL and NULL: Performance considerations

A recent query I had to tune had a WHERE clause similar to this: where t.myno = 1 and t.jz1 not in(3,4,5)           and (nvl(t.amount,0) != 0)           and nvl(t.status,'!') != 'J' Notice the NVL functions.  Let’s look at the first one. nvl(t.amount,0) != 0 In...

NOCACHE sequences come at a cost

Every so often I will look at an AWR report for a slow system, and updates to the data dictionary table SEQ$ will show up as a top resource consumer.  This is usually because sequences are defined using NOCACHE.  In this post we show why this matters and how to avoid...

Oracle undo, blocks read, and performance

Today we talk about the purpose of Oracle undo and give a demonstration of its use and little bit of what Oracle is doing under the covers.  We also show how query performance can be affected by what else is going on in the database. In the last post on transactions,...

What is an Oracle transaction?

In this post we’ll do a short discussion about Oracle transactions, and a simple demonstration of the principles discussed. The term transaction in Oracle means to take some data in the database from one consistent state to another.  The work done in a transaction by...