As title. Especially the insert performance of SAS JDBC is terrible when I'm writing a JDBC application by Java.
What I did was prepare an insert statement, then pass to the JDBC connection (SAS 9.4 IOM driver, driver class com.sas.rio.MVADriver).
I observed that SAS treated statement.executeBatch() / statement.execute() the same. Seems batch execution won't have performance gains. Tried to change the fetch size which almost the same. Suspended SAS log helped a little. But it's still very slow.
Deeply appreciated if somebody can share the tips for optimizing the SAS JDBC insert.
Attached the extraction of java code for discussion.
prepare and execute insert statements with SAS JDBC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Whilst this question is several years old now, I stumbled on it while investigating slow performance when using the SAS JDBC driver for lots of updates. For the benefit of others who may find this thread in future, I'll add my own findings too. Like the original poster I found that using JDBC batch didn't help much. In my case I found it was significantly faster to handle my own batching and spawn a workspace server session to submit proc sql code to do a batch of inserts/updates instead.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.