on 09-07-2016 6:34 AM
Hi
I had row store table with blob data type where i was able to insert images in table in blob data type column , i was able to update blob data type too for same inserted record. The image size is not more than 2 GB.
The two scenarios were possible on this table :
1) Insert large image and then update the inserted image with smaller size image .
2) Insert small size image and then update inserted image with large image.
I changed table from row store to column store just to test the performance of table.
I inserted large size image , and tried to update this with smaller size image. The update is successful.
I inserted the small size image , but i am unable to update the small size inserted image with large size image.
Any reason why update is failing in this column store scenario .
I am doing this image testing in java code.
Ok, without your code and the error messages you receive for the update, all we can do here is to be sorry for you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars
thanks for reply.
Here is the code , we are using JDBC driver ngdbc.jar in JAVA for accessing SAP HANA database.
This is simplified cut down code version.
The JAVA error i am getting after executing this code for update is(updating small size image with large one )
[129]: transaction rolled back by an internal error: Updating LOB data failed: row_count=0 but expected_count=1
JAVA CODE :
String INSERTQRY = "INSERT INTO " + "TABLE_IMAGE" + " (id, name, value, time, quality)" + " VALUES (?,?,?,?,?)";
String UPDATEQRY = "UPDATE " + "TABLE_IMAGE" + " SET value = ?, time = ?, quality = ?" + " WHERE id = ? AND name = ?";
if (insertflag){
PreparedStatement pstmt = connection.prepareStatement(INSERTQRY);
pstmt.setString(1, id);
} else {
PreparedStatement pstmt = connection.prepareStatement(UPDATEQRY);
Hi All
One strange behavior , as the code was not working for update statement ; i created Upsert statement
, upsert also failed then i created Stored Procedure and passed the required values for update.
AND IT Worked . Not sure why Update statement failed when update is called from Java
whereas Update worked inside stored procedure when stored procedure is called from JAVA.
Any one out here to explain this behavior..
Hi Lars
I looked into Index server log and found following log specific to transaction that i am running.
[1491]{-1}[-1/-1] 2016-09-07 12:07:42.937946 i SQLSessionCmd tcp_listener.cc(00217) : canceled transaction still not finished (cancelation might be still on-going): transaction id=77, update trans id=0, sql_string=, statement_hash=, user_name=INF188861, conn_id=449771, thread_id=0, app_user_name=, app_name=, app_source=
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.