0

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.

  • 1
    Possible dupe of http://stackoverflow.com/questions/607935/generate-table-indexes-using-fluent-nhibernate – Thewads Dec 17 '13 at 15:53
  • he's not asking to have the index create at schema creation time, He wants NHibernate to rebuild an already existing index. – Fran Dec 18 '13 at 15:37

1 Answers1

0

No. This isn't the purview of what NHibernate does. NHibernate is an ORM, not a database management tool.

Fran
  • 6,440
  • 1
  • 23
  • 35