On Wednesday 03 June 2009, Jari Fredriksson wrote: > > On Tuesday 02 June 2009, Michael Scheidell wrote: > > What "optional" fields are you refering to? > > > > I have seen this, on the spamassassin WIKI: > > > > CREATE TABLE awl ( > > username varchar(100) NOT NULL default '', > > email varchar(200) NOT NULL default '', > > ip varchar(10) NOT NULL default '', > > count int(11) default '0', > > totscore float default '0', > > PRIMARY KEY (username,email,ip) > > ) TYPE=MyISAM; > > > > Is there a better reference? > > CREATE TABLE `awl` ( > `username` varchar(100) NOT NULL DEFAULT '', > `email` varchar(200) NOT NULL DEFAULT '', > `ip` varchar(10) NOT NULL DEFAULT '', > `count` int(11) DEFAULT '0', > `totscore` float DEFAULT '0', > `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE > CURRENT_TIMESTAMP, PRIMARY KEY (`username`,`email`,`ip`) > ) ENGINE=InnoDB ;
Thanks, I can see that the 'lastupdate' field would prove handy over time. I'm noticing that most of the scripts, that I've found for processing AWL data, including 'convert_awl_dbm_to_sql' will not run, for me, as written. They seem to, invariably, use "tie %hash" and then use something like: my @k = grep(!/totscore$/,keys(%h)); to build a list of keys. My existing AWL has something over 10Million records, and my system only contains 4G of RAM. I've been rewriting the loops in the scripts that I'm trying to use from: my @k = grep(!/totscore$/,keys(%h)); for my $key (@k) { to: while(my ($key, $v) = each %h) This may be, a bit slower, but scales better to large data volumes. -- Larry G. Starr - lar...@fullcompass.com or sta...@globaldialog.com Software Engineer: Full Compass Systems LTD. Phone: 608-831-7330 x 1347 FAX: 608-831-6330 =================================================================== There are only three sports: bullfighting, mountaineering and motor racing, all the rest are merely games! - Ernest Hemmingway