My Oracle Support Banner

TopLink Queries On a DATE Column Uses Full Table Scan And Ignores an Existing Index (Doc ID 343941.1)

Last updated on DECEMBER 19, 2019

Applies to:

Oracle TopLink - Version 4.6 and later
Information in this document applies to any platform.
Oracle Database Server >= 9.0.1

Symptoms

The Oracle Database Server does not use an existing index on a DATE column, if  a query expression compares an attribute bound to that DATE column, but the data type of the attribute is either a java.sql.Timestamp, java.util.Date or java.util.Calendar.

This can severily impact the query performance, because the Oracle Database Server SQL optimizer will choose a full table scan instead of using the index.


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
 1. Use the Java Data Type That Matches Best With The Database Data Type
 2. Use a Custom FunctionOperator To Convert A Timestamp Parameter Into a Date


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.