The Informix SQL reference manuals state that using a prepared SQL statement together with an
Execute statement makes the SQL more efficient. If this is true, then which example is more
efficient:
declare cursor1 cursor for
select col1, col2, col3
from tablea
where col1 = col5
or
let l_SQL = "select col1, col2, col3 ",
"from tablea ",
"where col1 = col5"
prepare SQL_stmt from l_SQL
declare cursor1 cursor for SQL_stmt
Note that I did not use an execute in this example. Which of the aboove examples yields the best
performance and why?