cancel
Showing results for 
Search instead for 
Did you mean: 

Statements on Large Tables Executing Twice

Former Member
0 Kudos

I'm finding an issue when dealing with large tables on Revision 47 of SAP HANA. When executing a data manipulation statement, the statement appears to be executing twice. I carried out an insert based on a select from a table of 190m rows to a blank table and had to cancel it after it was approaching over 380m rows in the target. When looking at the progress pane in HANA Studio, the statement is listed twice.

Similarly when executing a truncate statement, the same thing appears to happen. The statement appears to be generated twice and continues to be in progress. See the picture below.

If I kill the HANA Studio session, restart and then execute again, it runs successfully in milliseconds. I can work around both issues, the truncate statement requires a restart of SAP HANA Studio. The insert statement will work if I chunk up the select into smaller datasets. It works OK at around 80 million records.

Has anybody else experience this type of issue? Both my HANA Studio and HANA DB are on revision 47.

Regards,

Gary Elliott

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Hi Gary,

I haven't encountered this yet, but I would guess that this is a display issue in HANA studio.

Obviously, the inserted data needs to be rolled back (e.g. marked as invalid in the delta log) and this of course takes time. My guess here would be that it'll take approx. the same time as doing the insert in the first place.

Anyhow, when you cancel/rollback the command, it seems that HANA studio returns to you immediately and let's you trigger the truncate command.

This can only start to actually perform some work, once the rollback has finished and the shared-table lock (that the DML statement set before) is released.

So, basically I assume that the TRUNCATE command is just waiting for the rollback to finish.

The irony here is of course, that once the rollback is done, you wouldn't need the TRUNCATE anymore, since all data is gone then anyhow .

To dig deeper I would go and check the active tasks/sessions lists in the administration perspective.

- Lars