cancel
Showing results for 
Search instead for 
Did you mean: 

Secondary Index CDS View

davide-grosso
Explorer
0 Kudos

cds-view.txt

Dear expert,

I created a CDS View using Eclipse. I attach the source code in the file cds-view.txt.

Is there the possibility(for performance issue) to create a secondary index(non-unique) on that?

For example now there is a primary key on TravelUuid. I like to create a secondary index on field AgencyId.

I check at the following link that it talks about the @catalog.index annotation but I'm not able to find it in eclipse to put inside to my code. Anybody can provide some example?

https://help.sap.com/viewer/09b6623836854766b682356393c6c416/2.0.04/en-US/8217aac86d9748d8b034797ecc...

Thanks and regards,

Davide Grosso

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor

As with any type of view, there is no option to create an index on the view object. Indexes are defined on entity/table objects only.

So, if there is indeed the need for a single column index (which is a rare case for HANA column store tables), then it needs to be defined on the base table that provides this column to the view.

Before doing this, though, I recommend to make sure it will actually improve performance. In many cases, a secondary index does not lead to better query performance but will definitively double the memory requirements for the indexed column.

davide-grosso
Explorer
0 Kudos

Hi Lars, ok, thank you very much!

regards,

Davide

Answers (0)