> WHERE myfield LIKE '________HH____' > > However this query will probably not use your index either :)
Yeah, it works, but still, it does not use my index as long as it is working with strings. But neat trick anyway. It sounds to me as if you need to change your table design. You want to search by hours only, so you should have an hours column in your database. Either you should break the date up into DATE and TIME fields, or you should break normalisation by having a separate, redundant, hours field. Either way, you can then index by the data you actually want to search by and get a fast response. Which you do, of course, depends upon your updating mechanisms. Alec Cawley --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php