Hi Inanc,
I see it no way a query optimization question. If we would talk about milliseconds then probably yes. But if insert of 750 records takes 7-8 minutes… then I’d rather think about HANA bug or something is completely wrong in your system. Which HANA revision you are using?
Try to narrow down the problem, e.g.:
- Replace
createtable"SYSTEM"."SIMILARITYSCORES"
with
create column table"SYSTEM"."SIMILARITYSCORES - Check if this is a general INSERT problem. E.g. check how much time the following statement will take:
CREATE COLUMN TABLE TEST_TABLE as (SELECT TOP 1000 * FROM PUBLIC.M_CS_TABLES).
In my HANA system it took 7.5s. - Limit number of records to be inserted by your statement. Check how long will it take to insert different number of records e.g. 10, 100, 200
- Monitor thread(s) executing the statement in Performance\Thread in Studio. Check if there is any evidence of lock situation and anything else suspicious. Look at column Status if there anything like Semaphore Wait etc. Switch on Create Call Stack check box to see if the time is spent in particular piece of code. This may help to search SAP Note for already known problems or give and idea how to analyse the problem further.
- During or after execution of the statement check index server trace file and check if there are any messages that may be relevant and indicate potential root cause of the problem.
Regards,
Dmitry