New Util_History Table
- Last UpdatedDec 18, 2018
- 4 minute read
Captures utilization data and a chronological sequence of utilization events for each entity that can capture utilization data. This data includes entity utilization states, utilization reasons, number of occurrences, and the timestamps when an entity's utilization state or reason changes (that is, when a new event occurs).
Updates to utilization event records in this table do not have any impact on the job_history table. However, if the utilization event being modified occurred before the cut‑off period prior to the current UTC time, then the corresponding record in the job_hour_history table will be updated.
Utilization event durations are dynamically calculated when event durations are requested. An event's duration is calculated as the time between its event_time_utc and the next contiguous event's event_time_utc.
Shift information for utilization events is dynamically determined based on the event's event_time_utc.
The util_log database view substitutes for the util_log table that existed in the database prior to MES version 6.0. The util_log view uses the util_history table in its query and returns the same column names that existed with the previously available util_log table.
If an entity can capture events, the following occurrences will cause data write operations to this table:
-
A raw reason change from a UCO creates a new record.
-
A reason change from MES Operator creates a new record.
-
A job start or end creates a new record if the entity is configured to create new utilization event upon job status changes (utilization state and reason comes from the Util_Exec table).
-
A shift start or shift end creates a new record if the entity is configured to create a new utilization event upon a shift change (utilization state and reason comes from the the Util_Exec table).
If default shift start or shift end reason codes have been configured for the entity, the reason code that is used on a shift start or end is determined as follows:
-
When a shift starts, the default shift start reason code is used if one is configured for the entity.
-
When a shift ends and it is immediately followed by another shift with no time gap in between, the default shift start reason code is used if one is configured. However, if no default shift start reason code is configured, the default shift end reason code is used if one is configured.
-
When a shift ends and it is followed by a time gap before the next shift, the default shift end reason code is used if one is configured.
-
-
An existing event is split to a new event or a new historical event is added to an entity.
-
Data Editor can create, update, and delete records.
Field
Datatype
PK
Nulls?
Description
ent_id
int32
Y
N
Identifies the entity.
event_time_utc
tdatetime
Y
N
Timestamp of the event start, in UTC (GMT).
event_time_local
tdatetime
N
N
Timestamp of the event start, in local time.
state_cd
int32
N
N
The entity state.
reas_cd
int32
N
N
The entity reason.
reas_pending
logical
N
N
Specifies whether to prompt the user for override. Default = No.
runtime
logical
N
N
Count the event time as runtime. Default = No.
downtime
logical
N
N
Count the event time as downtime. Default = Yes.
setuptime
logical
N
N
Count the event time as the event time setup time. Default = No.
teardowntime
logical
N
N
Count the event time as teardown time. Default = No.
fixedtime
logical
N
N
Count the event time as fixed time. Default = No.
vartime
logical
N
N
Count the event time as variable time. Default = Yes.
failure
logical
N
N
Count the event time as a failure. Default = No
comments
string2000
N
Y
Comments about the event.
raw_reas_cd
string40
N
Y
The underlying raw reason code, if the event is from a UCO.
spare1
string80
N
Y
Use defined by language term 5631.
spare2
string80
N
Y
Use defined by language term 5632.
spare3
string80
N
Y
Use defined by language term 5633.
spare4
string80
N
Y
Use defined by language term 5634.
category1
string80
N
Y
User-defined category copied from the Util_Reas table. Used for sorting and grouping the reasons.
category2
string80
N
Y
User-defined category copied from the Util_Reas table. Used for sorting and grouping the reasons.
category3
string80
N
Y
User-defined category copied from the Util_Reas table. Used for sorting and grouping the reasons.
category4
string80
N
Y
User-defined category copied from the Util_Reas table. Used for sorting and grouping the reasons.
last_edit_comment
string254
N
Y
Why this record was changed.
This field is internally maintained. The last transaction context is stored in this field to indicate what caused the record to be inserted or modified.
last_edit_by
string40
N
Y
Who last changed this record.
last_edit_at
tdatetime
N
N
When this record was last changed.
log_id
ID 0
N
N
Unique row identifier.
Holds the log_id from the util_log table when migrating data from a version of MES prior to version 6.0.
FK from ent_id to ent. (Cascade delete)
ent_id, event_time_utc is UK.