Hi,
Can anyone help me with the actual purpose of index when its unique property set to "No"?
I am aware that it is used for quick retrieval of data. Is it act like a filter?
Hi @Xavior ,
Indexes are a database tool, not specific to Outsystems, and can be thought of pretty much like an index of words at the end of a book.
If you filter on any given value for one of your attributes, having that index in place will help you find the rows (pages in the book) much faster than having to go through each row (page).
But the content of a database changes often (unlike the pages of a printed book), and every time you update/create/delete any data, the dbms also has to update the relevant parts of all indexes defined for your entity.
So faster retrieval IF sorted or filtered on relevant attribute, slower updating, your job as a developer is to weigh these and choose wisely.
Dorine
In general though, data is retrieved way more often than it is stored, except maybe for stuff like logging, so in general, if you are filtering on a value often, an index should be considered.
Also note that foreign keys will be automatically given an index by Service Studio.
Hi Xavior,
Please check the below documentation: https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Data_Modeling/Create_an_Entity_Index