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
> SELECT
> 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
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://old.nabble.com/Appending-WITH-UR-to-non-native-queries-tp28482017p28524170.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top