On a few occasions we use the history table to calculatie timings and would like to add an index to the history table for improved performance.
If you want to use an index on the PK of the original table, you can use the thinkstore model “Add index temporal table” for this:
I tried using the Thinkstore model ‘Add index temporal table’, but it did not seem to work correctly. I added the ‘add_history_index’ tag to table with system versioning, but it looked like the model tried adding indexes to all tables in stead of only the table with that tag, which resulted in a MERGE conflict.
I was also wondering if this model would allow me to add indexes to specific columns of the history table? And if not, what is the recommended way to do something like this?
I tried using the Thinkstore model ‘Add index temporal table’, but it did not seem to work correctly. I added the ‘add_history_index’ tag to table with system versioning, but it looked like the model tried adding indexes to all tables in stead of only the table with that tag, which resulted in a MERGE conflict.
I was also wondering if this model would allow me to add indexes to specific columns of the history table? And if not, what is the recommended way to do something like this?
Hi Freek,
The solution should no try to add the index to every table, only for tables with system_version enabled and the tag attached, I just checked the code and I cannot see where it could go wrong.
Can you show me the code of the dynamic model of the solution?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.