Skip to content

9.3.0 - Improved Natural State Machines with EF Core

Latest
Compare
Choose a tag to compare
@aidapsibr aidapsibr released this 17 Apr 17:26

This release focuses on querying the current state of a state machine, specifically using a SQL implementation. Previously users would have to illicit information from the state JSON which was computationally expensive at scale. Users can now use the new index to query the current state much more effectively.

Natural State Machines

In order to effectively get state a new computed column has been added and indexed in order to quickly find the state of a given machine.

Unlisting 9.2

Unfortunately the updates that originally put these changes in place in version 9.2 did not address the root cause of the performance problems. The version 9.2 is therefore being unlisted and user using 9.2 would need to run the following script to change the dB in place

DROP INDEX [IX_Machines_SchematicName_NaturalStateName_UpdatedTime] ON [dbo].[Machines]
GO

Update [dbo].[Machines] set [NaturalStateName]= null

CREATE NONCLUSTERED INDEX [IX_Machines_SchematicName_NaturalStateName_UpdatedTime] ON [dbo].[Machines]
(
	[SchematicName] ASC,
	[UpdatedTime] ASC,
	[NaturalStateName] ASC
)
INCLUDE ([MachineId]) 
GO