Open topic with navigation

TIBCO ActiveSpaces® - Enterprise Edition 5.0.0

# Function Usage on Index Columns

When using date and time functions on primary key or secondary index columns in a WHERE clause or table iterator filter `string`, the application of the function to the column, in the left side of an equation, does not reduce the number of rows being examined for a query. Indexes are used based on comparisons to the actual value of a column and not the value that is the result of conversion by functions.

You can use the date and time functions in comparison with key or index fields and still get the benefit of the key or index, if you use the function on the right-hand side of the equation. For example, if the `dtm` column is of type `datetime` (holds tibDateTime objects) and `dtm` is defined as a secondary index, the following query only scans those rows with a date less than '2018-06-01 00:00:00':

    SELECT * FROM mytable WHERE dtm < datetime('2018-06-01')

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO ActiveSpaces® - Enterprise Edition

Copyright © 2009-2025. Cloud Software Group, Inc. All Rights Reserved.