Skip to main content
Completed

I would like to create index on history table (system versioning) via SF.

Related products:Software Factory

Freddy
  • Thinkwise Local Partner Brasil

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. 

Mark Jongeling
Administrator
Forum|alt.badge.img+23
NewOpen

Renée Evertzen
Moderator
Forum|alt.badge.img+4
OpenWorking on it!

Renée Evertzen
Moderator
Forum|alt.badge.img+4
Working on it!Next release

Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Next releaseCompleted

Robbert van Tongeren
Thinkwise blogger

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:

https://community.thinkwisesoftware.com/product-updates/thinkstore-model-updates-2025-1-5790?tid=5790#Add+index+temporal+table

 


Forum|alt.badge.img

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?
 


Robbert van Tongeren
Thinkwise blogger
Freek Berends wrote:

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?



Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings