5
I am creating indexes for some columns that will be used in a query with Where()
. The intention is to make the search faster. Until then I was creating like this:
Property(x => x.Documento)
.HasColumnAnnotation(IndexAnnotation.AnnotationName,
new IndexAnnotation(new IndexAttribute("ix_documento", 1) { IsUnique = false }));
Property(x => x.Vencimento)
.HasColumnAnnotation(IndexAnnotation.AnnotationName,
new IndexAnnotation(new IndexAttribute("ix_vencimento", 2) { IsUnique = false }));
But I noticed that the class IndexAttribute
has a constructor that accepts only the index name.
The description of the parameter order
is:
order: A number which will be used to determine column Ordering for multi-column Indexes.
It would be something like that:
A number that will be used to determine column ordering for multi-column index
I didn’t understand that, and whether in my case makes any difference or not.
Reply with more details on Multi-column Index: http://answall.com/a/55137/26552
– user26552
@Murilo I searched for some reference here on the site, but had not found. I will add in reply, thanks.
– Randrade