Database is simliar to this:
Description:
If the value equals "ALARM", the machine will break down until the corresponding "A_OK" appears. Each ALARM and A_OK have a "TAGNAME" that indicates different parts of the machine.
Goal:
We want to find out how much time we lose in producition due to the breakdown of different parts. So we need to calculate the time between each "ALARM" and "A_OK" for each different "TAGNAME".
Misc.
The database is huge, containing about 600,000 entries.
I need:
TagName Frequency Total Downtime
It's driving me crazy. Please please give me a helping hand.
Code:
[B][U]ID TIME TAGNAME VALUE[/U][/B] 5967383 8/1/2008 1:00:24 AM I16MUDL11 ALARM 5967384 8/1/2008 1:00:24 AM I16MUDL09 ALARM 5967391 8/1/2008 1:00:32 AM I16MUDL11 A_OK 5967392 8/1/2008 1:00:32 AM I16MUDL09 A_OK 5967398 8/1/2008 1:00:36 AM I16MUDL11 ALARM 5967406 8/1/2008 1:01:10 AM I16MUDL11 A_OK 5967407 8/1/2008 1:01:10 AM I16MUDL09 A_OK[B][U][/U][/B]
Description:
If the value equals "ALARM", the machine will break down until the corresponding "A_OK" appears. Each ALARM and A_OK have a "TAGNAME" that indicates different parts of the machine.
Goal:
We want to find out how much time we lose in producition due to the breakdown of different parts. So we need to calculate the time between each "ALARM" and "A_OK" for each different "TAGNAME".
Misc.
The database is huge, containing about 600,000 entries.
I need:
TagName Frequency Total Downtime
It's driving me crazy. Please please give me a helping hand.
Comment