We help IT Professionals succeed at work.
Get Started

Function based index not working

429 Views
Last Modified: 2013-12-26
Can anyone explain why the function based index is doing a full table scan using TRUNC(approval_date) in the where clause but uses the index for approval_date in the where clause. Thanks

CREATE INDEX PRICE_CHANGE_I9 ON PRICE_CHANGE
TRUNC(approval_date)
NOLOGGING COMPUTE STATISTICS;

SELECT  *
FROM   price_change
TRUNC(approval_date) = SYSDATE
FULL TABLE SCAN

SELECT  *
FROM   price_change
approval_date = SYSDATE

Uses Index
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 5 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE