16
Views
2
Comments
Solved
Are old records automatically indexed?
Application Type
Traditional Web, Mobile, Reactive, Service

Hi there,

I am wondering, suppose there is an entity without column indexed. Then some months later, the entity is column indexed.

My question is: what happen to the old records before an index created - are Os automatically create indexes for them or not?

regards and thanks

2023-12-16 19-57-03
Sanjay Kushwah
Solution

Hi @ibox,

Yes Outsystems will create Index for OLD record also.

suppose you have Employee  entity and you are adding unique index on Email attribute and try to publish if there are duplicate emails already available in DB then it will give you upgrade Error

 "Could not create unique index on 'EMAIL' of entity 'Employee'. It has duplicate values."


Thanks & Regards,

Sanjay Kushwah

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Note it isn't the Outsystems Platform that does this, it's that database itself. But the net effect is the same: when creating a new Index on an Entity, all records of that Entity are indexed. Also note that depending on the number of records, this may take a while (though typically not more than a few seconds).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.