I want to execute a SELECT with a query optimization level 0 and then set it right back at 5. I am currently thinking about using 3 statement:

SET CURRENT QUERY OPTIMIZATION 0;
Select c1 from t1;
SET CURRENT QUERY OPTIMIZATION 5;

Is their a better way to do this ? I want it to affect only query on t1.

Regards,

Dany