문제

Suppose I have a entity with a id and a name fields. I want to look up those entities by name and I build a database index on the name field .

Now when I use NHibernate QueryOver, can NHibernate utilize the database index on name ?

if a second level cache is used , what algorithm will NHibernate use to find entites by name ?

도움이 되었습니까?

해결책

NHibernate ultimately sends SQL to your database server. It is up to the SQL optimizer of your DB server (MySQL, MS SQL Server, etc) to decide whether to use an index or not.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top