Welcome to WebmasterWorld Guest from 23.20.215.116

Forum Moderators: open

Message Too Old, No Replies

Table design

     
5:25 pm on Jan 5, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:Nov 8, 2005
posts:83
votes: 0


Hello,

If I have a lot of fields with values 0/1 in my mysql table which I use for filtering data by that field (ie. WHERE field=1...)

What is the best type for that field for fastest performance?
enum ('0','1') or tinyint?

Thanks

5:30 pm on Jan 5, 2009 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12541
votes: 1


BOOLEAN
5:45 pm on Jan 5, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Sept 9, 2004
posts:643
votes: 0


I generally use integer/tinyint in case I change my software requirements down the road.