Raimund Jacob wrote
> 
> i am connecting to SAPDB using JDBC and PreparedStatements that are
> parameterized ('?' and setXXX()).
> 
> Question: what does the optimizer with constant values in a prepared
> statements? does the optimizer run when i .prepare() a statement? does
> it run later?
> 
> does it make a difference wether i "SELECT ... WHERE foo > 3" 
> or "SELECT
> ... WHERE foo > ?" (and set the 3 as parameter)?
> 

The optimizer starts the strategy search at prepare phase. 
If parameter exists on strategy relevant columns like index or key columns 
the optimizer postpones this decision to execution time.
So the optimizer should find the same strategy with parameters or with 
constant values.

Kind Regards 
Holger

SAP Labs Berlin

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to