I have numeric data with numbers representing the event that happened. Events can be public or private. I have 2 choices and I don't know which one to use (is faster).
I can make 2 columns, 1 is the event column and the values are like 1...10. The other is the public/private smallint column that says if the event is public or private.
I can make only one columns and number private events from 1...10 and public events from like 100...120. I have therefore "hid" the Event type into this column.
Now I want to filter with select of course... I would filter the first approach as SELECT * from event_table WHERE EventType=1
I would filter the second approach like: SELECT * from events_table WHERE EventID>100
Now what I really want to know, is the numeric = condition (contant) any faster than < or > (of course I will index this column!). With the second approach I would need one column less. I am not even sure if this is good or not...
Any advise would be appreceated.
Jerry