On 23-Sep-2004 Eamon Daly wrote: > I'm interested in this, too. We have a logging table that > sees hundreds of rows per second, and we do a ton of monthly > reports. We just bit the bullet and added an indexed DATE > column. Is there a better strategy? >
I do something similar but with MEDIUMINT. hittime DATETIME NOT NULL DEFAULT '0000-00-00', prd MEDIUMINT UNSIGNED NOT NULL DEFAULT 0, ... KEY idx_p (prd), ... UPDATE tbl SET prd=EXTRACT(YEAR_MONTH FROM hittime) ... Then query it with SELECT ... WHERE prd=200408 etc. -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]