It's just hard to know if I need 255 characters per record because I do not control the content. And to be sure that all data will pass, I'm 255. In fact I am developing an application that dynamically creates tables that should contain data that can be IP addresses, dates, lengthy text, etc. But as the tables are created dynamically, it is impossible to know that this field will contain such data type. So I took while VARCHAR (255). After, I need to make a line already registered, its not registered again. That's why I want to make a unique index of all fields. The structure of one of the tables:
Code:
CREATE TABLE IF NOT EXISTS `log_w3svc1` (
`Nr` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(255) DEFAULT NULL,
`time` varchar(255) DEFAULT NULL,
`s_sitename` varchar(255) DEFAULT NULL,
`s_ip` varchar(255) DEFAULT NULL,
`cs_method` varchar(255) DEFAULT NULL,
`cs_uri_stem` varchar(255) DEFAULT NULL,
`cs_uri_query` varchar(255) DEFAULT NULL,
`s_port` varchar(255) DEFAULT NULL,
`cs_usrname` varchar(255) DEFAULT NULL,
`c_ip` varchar(255) DEFAULT NULL,
`cs(usr_agent)` varchar(255) DEFAULT NULL,
`sc_status` varchar(255) DEFAULT NULL,
`sc_substatus` varchar(255) DEFAULT NULL,
`sc_win32_status` varchar(255) DEFAULT NULL,
`Application` varchar(160) NOT NULL DEFAULT 'GestLog',
PRIMARY KEY (`Nr`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2490 ;
Bookmarks