Home » » Avoiding Calculations on Indexed Columns -Oracle SQL Performance Tuning Tips -atz help

Avoiding Calculations on Indexed Columns -Oracle SQL Performance Tuning Tips -atz help

Written By M.L on ஞாயிறு, 22 ஏப்ரல், 2012 | ஏப்ரல் 22, 2012

Avoiding Calculations on Indexed Columns -Oracle SQL Performance Tuning Tips -atz help

The optimizer does not use an index if the indexed column is a part of a function (in the WHERE clause). In general, avoid doing calculations on indexed columns, apply function and concatenating on an indexed columns.
 
  Select * from
  Account
  Where substr(ac_acct_no,1,1) = 1

 Instead use -

   Select * from
  Account
  Where ac_acct_no like 1%

 Note : The SQL functions MIN and MAX are exceptions to this rule and will utilize all available indexes.

Note : Provide your comments by clicking below options! Thanks ! :)

0 comments:

கருத்துரையிடுக

Popular Posts

General Category