0
votes

Does anyone know if there's a recommended set of database indexes for Orchard's core modules? I can't seem to find much info around this, and while I appreciate that the code uses NHibernate to abstract the underlying database, I suspect 99% of users will simply be using SQL server/Express as the default DB and would require suitable indexes to be added. For example on: Orchard_Framework_ContentItemVersionRecord ([Published], [ContentItemRecord_id])

If there isn't already, would it be a good idea for the core modules to have a recommended set of indexes documented somewhere, as they're clearly going to be required for any serious deployments based on an RDBMS?

1

1 Answers

1
votes

You're right that some indices would help queries. However with indices it really depends on the usage pattern so there are not many built-in; but you can always add them yourself depending on your specific usage (you can also use SQL Server's tools to recommend indices for your). You can even add indices from migrations to other modules' tables.

In the latest source of Orchard (not yet released) there are also some more default indicies, also for ContentItemVersionRecord. You can see them in FrameworkDataMigration in the 1.x branch.