select query optimization for 3 choices

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cary

    select query optimization for 3 choices

    i want to do a search on a table with a field called 'gender'. there
    are 3 possible values for this field. the text versions would be

    male
    female
    either

    i'm trying to figure out the fastest way to get 'where gender=...'
    from the table.

    i know i can use ENUM ('male','female ','other')
    or TINYINT and the values would be 0,1 or 2
    a third option would be char(1) with a 0,1 or 2 value

    the field would obviously be indexed.

    which column type should i be using to optimize this query?

    thanks,
    cary
Working...