User Profile

Collapse

Profile Sidebar

Collapse
thelightkeeper
thelightkeeper
Last Activity: Jan 31 '08, 09:43 AM
Joined: Oct 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • [How to] avoid cross product/Cartesian product to improve performance

    Hi,

    I have 1 table contains about 4 millions entries structure like below:

    [Alarm History]
    (
    AlarmID int,
    SetTime datetime
    )

    Now I want to :
    SELECT all the AlarmID that happened during Jan 2008 and no such AlarmID during Dec 2007. I used:

    SELECT * FROM [Alarm History]
    WHERE SetTime BETWEEN '1-jan-2008' AND '31-jan-2008'
    AND AlarmID
    ...
    See more | Go to post

  • thelightkeeper
    started a topic A challenge in Operators-Alarm

    A challenge in Operators-Alarm

    Hi,
    in MSSQL, I have 2 tables naming [Equipment Alarm History] , [EquipmentOperat ors]

    Code:
    [B][Equipment Alarm History]
    ---------------------------------------
    EquipmentID : nvarchar(50), FK, reference [EquipmentOperators].EquipmentID
    AlarmID : nvarchar(50), PK
    AlarmHappenTime : Datetime ,required, not null
    AlarmClearTime : Datetime, required, not null[/B]
    and

    Code:
    [B][EquipmentOperators][/]
    ...
    See more | Go to post
No activity results to display
Show More
Working...