Skip to Main Content

Oracle Database Discussions

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!

Create function-based index on DBMS_LOB.COMPARE(customFunction(...)) ??

SebinoJul 2 2021 — edited Jul 2 2021

Hello,
In 11.2 I found a query doing this:

Select count(1)
from T
where dbms_lob.compare(T.blobColumn, customPkg.encrypt(:1 , '<key>')) = 0
   and otherColumn != :2

which means I'm traversing the whole T minus 1 row (because otherColumn has unique values), taking every blobColumn and comparing it with :1 which is a clob, that gets encrypted and returned as a blob...
This table is constantly growing, and soon this query will take too much time...
Do you think there's a way of indexing these embedded calls DBMS_LOB.COMPARE(customPkg.encrypt()) ??
customPkg.encrypt() is deterministic.
Thanks a lot.
Sebino

This post has been answered by Jonathan Lewis on Jul 5 2021
Jump to Answer

Comments

Post Details

Added on Jul 2 2021
3 comments
483 views