Did you create a plan table and then insert this query into it? If not, check Oracle documentation.