Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Appending WITH UR to non-native queries

You can define your own DB2Platform subclass that does this.  You just need
to override the printSQLSelectStatement() method.

You may also wish to measure the performance difference between the two SQL
queries to verify if it really makes any difference.

Zarar Siddiqi wrote:
> Hi,
> We're using DB2 and the DBA here recommended that we use uncommitted reads
> to improve performance.  I have to add "WITH UR" at the end of every
> query.  This isn't a problem from the native queries as I can just add it
> there manually, but for the non-native ones, adding "WITH UR" throws an
> exception since it doesn't understand the keywords.  This makes sense to
> me.
> I was wondering what the best way to go about achieving this is.  Is there
> a
> way to customize the session and perhaps check whether an about-to-be
> executed query is a SELECT and if so, append WITH UR at the end of it?
> Any ideas how to manipulate the SELECT queries to append these two words?
> Thanks,
> -- 
> Zarar
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

----- James Sutherland
 EclipseLink ,
Wiki: EclipseLink , TopLink 
Forums: TopLink , EclipseLink 
Book: Java Persistence 
View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top