At 05:58 PM 1/24/2002 -0500, Michael Stearne wrote: >The problem is, this query really hurts (I don't know if it finishes) for >unindexed field for 2.9 million rows. But I'm sure it will finish eventually.
Yes, it will really hurt. After all, there's no way for MySQL to do this other than pulling in this column one at a time from each and every row in the table and doing the string count. See if you can do a SELECT COUNT(*) FROM Table in a reasonable amount of time. If you can, you may want to do this programatically in a small C++ (or C, or whatever) program. It _may_ be faster. It may not, there'll be a lot of network traffic. SQL servers tend to be rather bad at string manipulation, something like this would be easy in C or in Perl. --------------------------------------------------------------------- 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