in reply to Re: which method is more faster?
in thread which method is more faster?
just to extend it a bit, using "bind variables" will not guarantee that the database will not preprocess it, but it'll do it often.
the optimizer will optimize every query if there is not a cached optimization, and cacheing is performed on the query string itself, so bind variables allow you to have the same statement string (same optimization then) for every different "variable value".
Note: a backdraw is that optimization over a bind variable could not be always efficient as using the real value (think about range-scan) but usually it's never encouraged 'cauz the gain is very low, and will cache-out something that could be usefull.
Oha