Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trunc or not to trunc?

789736Jan 3 2014 — edited Jan 4 2014

Hi guys, 

I have a select statement which is selecting data and one of the where clauses is:

and trunc(vdv.created_date) >= trunc(sysdate - 28)

vdv.created_date is a date field.

This query is running slow, takes about 10 seconds and I am assuming it is due to the trunc(vdv.created_date).  Is there a way I could make it more efficient?  I am begining to think the trunc on vdv.created_date is not required as it will bring back the same data regardless? Is this correct?

Thanks for any help I may get.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 2 2014
Added on Jan 3 2014
7 comments
1,866 views