performance - How do you adjust Sybase optimizer settings in Java at the session level? -


per sybase, can adjust optimizer settings @ session level such:

set plan optgoal allrows_dss 

but syntax use include in connection string using java's drivermanager.getconnection? right this:

connection conn = drivermanager.getconnection("jdbc:sybase:tds:myservername:myportnum/mydbname", user, password); 

thanks in advance answers.

ok, figured out, sharing wants know in future. don't know if right or best way, works:

connection conn = drivermanager.getconnection(url, user, password); statement s = conn.createstatement().executeupdate(" set plan optgoal allrows_oltp "); resultset rs = conn.createstatement().executequery(" select @@optgoal "); rs.next(); system.out.println("session-level optimizer set to: " + rs.getstring(1)); 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -