Adding index to a table

后端 未结 2 1019
梦如初夏
梦如初夏 2020-12-03 12:03

I have a table Person: id, name

I often have queries like:

select * from Person where name Like \"%abc%\".
2条回答
  •  星月不相逢
    2020-12-03 12:39

    in EF 6 you can create indexes like this

       Property(t => t.TotalValue)
                .HasColumnAnnotation(
                    IndexAnnotation.AnnotationName,
                    new IndexAnnotation(new IndexAttribute("IX_inventory_import_total_value", 1))
                );
    

提交回复
热议问题