I have the following code. To improve performance, i am looking forward to rebuild the index on the table before I start scanning for the first 500 items in the table.
using(var session = sManager.OpenSession())
{
using (var trans = session.BeginTransaction())
{
var rows = 0;
foreach (var idsChunk in total.Chunk(500))
{
.... <Execute Update>
}
trans.Commit();
}
}
Can you please suggest if it is possible for me to rebuild the indexes on the table using NHibernate and if so then how?
Regards.