Maybe a silly question, but is it safe to use a function based indexes. I mean, when the column changes is the index changed right away?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming they are setup correctly, Yes.
OVERVIEW:
Oracle creates a hidden column on the table with the function based index which is updated each time the columns on which the function based index are changed; assuming the values are deterministic (See oracle link for more info). You can see these hidden columns by querying the system object all_tab_cols your table on which the function based index was created. They typically contain a $ and look something like SYS_NC00005$.
They are often used when you want to handle case sensitivity or handle repeated functions calls on which the overhead of executing the function call is with such frequency that the value up front time of computing the value once and retaining it results in a performance gain.
Additional reading: