> There are about 1.7 million 10-character long strings. A query like this
one
> takes about 5 seconds:
>
> SELECT junk FROM data WHERE junk='xxxxxxxxxx';
>
> Subsequent queries for the same string return right away.

That's because you have the mysql query cache enabled and mysql can return
the answer immediately without running the query at all.

> Is it normal for this to take so long? Grepping against a flat text file
> representing my data takes a far less than a second. Any thoughts, folks?

- What is the output of EXPLAIN SELECT junk FROM data WHERE
junk='xxxxxxxxxx'; ?
- What if you OPTIMIZE data; ? Does it get any faster?

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to