Dear all,
I currently have a table with 50.000 entries and I would like to improve the query times in this table. My application has allot of xpath retrieves that involve a enum value with 10 distict different values that are all comparably frequent in my database. However, these retrieves often include 'AND / OR' statements on other attributes or are combined with retrieves over associations to other objects. Will adding an index on this field improve these retrieves or will it have little effect compared to the extra cost needed for saving new objects?
Medix documentation states:
Indexes are ordered. This means that when creating an index on two or more attributes, it is important to consider the order of the attributes. When performing a search or query on multiple attributes, these attributes should be in the same order as those in the index to take advantage of the improved performance. By extension, when the retrieval is constrained by only one attribute, the improved performance is only achieved if this is the first attribute in the index.
Since the associations are on Mendix guid, I interpret this as that adding this index will have no benefit. Additionally it is not clear if performance is improved for statements with 'AND/OR' attributes that are not added to the index.
For me getting a understanding on databases the following link helps explain.