-
Notifications
You must be signed in to change notification settings - Fork 933
-
Hi,
I'm using the current version of NH as well as FluentNH.
Using the DDL capabilities of NH, a multi-column index over value or foreign key columns uses the order in which those columns get mapped.
I'm looking for a way to create an index over a foreign key column and a discriminator column, where the foreign key column is the first in the multi-column index. However, I always end up with the discriminator column being first.
My goal is to increase the index performance. Which means the column with the most diverse values should come first. This clearly means the foreign key column needs to come first.
Can I somehow reorder the columns within a mapped index, or even reorder all the columns? Alternatively, can a discriminator column double as a regular a value column? Therefore, I would create the index over a foreign key column and a value column instead?
Beta Was this translation helpful? Give feedback.