Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: Hana JDBC PreparedStatements are SLOW

$
0
0

To add to what Lars mentioned (re-run with prepareStatement outside of loop), consider using batched execution for   UPDATEs and DELETEs.

 

PreparedStatement ps = conn.prepareStatement(q);

for (int i = 0; i < 1000; i++){

   //set parameters

   ps.addBatch();

   //every N time -> ps.executeBatch();

}

//execute last batch, if necessary.

 

Also, to eliminate any network latency and generally for better precision I would recommend using TOTAL_PREPARATION_TIME metric in  in http://help.sap.com/hana/html/_m__c_o_n_n_e_c_t_i_o_n__s_t_a_t_i_s_t_i_c_s.html view. You just need to identify CONNECTION_ID of your benchmarking application.

 

Regards,

 

Sergei


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>