티스토리 뷰


ORA-30553: The function is not deterministic


 

Cause

The function on which the index is defined is not deterministic

Action

If the function is deterministic, mark it DETERMINISTIC. If it is not deterministic (it depends on package state, database state, current time, or anything other than the function inputs) then do not create the index. The values returned by a deterministic function should not change even when the function is rewritten or recompiled.



함수를 인덱스 컬럼으로 만들 때
DETERMINISTIC 없으면 에러가 난다. 



CREATE INDEX 인덱스명 ON 테이블(함수명(P_STR))
TABLESPACE 테이블스페이스;

했다면 

CREATE OR REPLACE FUNCTION 함수명(P_STR IN VARCHAR2)
RETURN VARCHAR2 DETERMINISTIC
...

DETERMINISTIC 를 꼭 명시하라
 
댓글