> I tried it on my SQLServer and Oracle DB:
> select * from SomeTable
> where SomeDateTime < {ts '2012-02-06 20:48:59'}

Caveat: if for some reasons "statement.setEscapeProcessing(false)",
the above syntax would not work.

I tried to change in our code base and it failed for that reason. I
re-activated escape processing because I don't notive any particular
performance impact but bear this in mind.

Note that there are several things that are affected by escape processing:
- Scalar functions (e.g.: {fn concat("Hot", "Java")})
- date and time literals
- outer joins
- calling stored procedures and functions
- escape characters for LIKE clauses

Refer to section 13.4 of the JDBC 4.0 specification to have more info.

The reason for disabling escape processing may be performance:
"
If escape processing is enabled, a JDBC driver will scan for any
escape syntax and do escape substitution before sending the escaped
statement to the database. When escape processing is disabled, the
driver will ignore escaped statements. Until this method is used to
disable escape processing, it will be enabled. The most common reason
for disabling escape processing is to increase performance.
"

Found on:
http://books.google.ch/books?id=GE-vWERNdpIC&pg=PA840&lpg=PA840&dq=setEscapeProcessing+performance&source=bl&ots=QBZYQuYtrs&sig=Rdemeu2LyjbrWU-ZszEjFQsS1NE&hl=en&sa=X&ei=qw9CT_S8A8Sq-gau3KS9BQ&redir_esc=y#v=onepage&q=setEscapeProcessing%20performance&f=false


Hope this helps,
-Christopher

Reply via email to