Stephan Bruijnis .dev

TIL

Don't combine unique validation rule with an index

Jul 26, 2022
Mendix, TIL
Database, Performance

Q: Should I use an index on an attribute if it also has an unique validation rule? For example when I use that attribute a lot when retrieving data? A: No. When you add a unique constraint on an attribute, you don’t need to add an index on that attribute. Mendix will create an index for that unique constraint. Adding an index on the same attribute will create a duplicate index and impact performance, wasting database resources and generating unnecessary overhead. ...