在oralce中給自建函數(shù)創(chuàng)建索引,結(jié)果不成功。source:Create Index IDX_T_SP_TWOTYPESTAT_0_f On T_SP_TWOTYPESTAT_0(f_dateadd(yearmonth,12,2));我們看一下這是為什么?隨便一個(gè)測(cè)試可以再現(xiàn)這個(gè)問題,我門創(chuàng)建一個(gè)函數(shù)(本范例函數(shù)用于進(jìn)行16進(jìn)制向10進(jìn)制轉(zhuǎn)換):CREATE OR REPLACE FUNCTION h2ten (
err:the function is not deterministic.
The hintDETERMINISTIChelps the optimizer avoid redundant function calls. If a stored function was called PReviously with the same arguments, the optimizer can elect to use the previous result. The function result should not depend on the state of session variables or schema objects. Otherwise,
results might vary across calls. OnlyDETERMINISTICfunctions can be called from a function-based index or a materialized view that has query-rewrite enabled.
新聞熱點(diǎn)
疑難解答
圖片精選