At 01:22 PM 5/18/2004, you wrote:
Here's my table:

CREATE TABLE 'data' (
  'junk' char(10) NOT NULL default '',
  PRIMARY KEY  ('junk')
) TYPE=MyISAM;

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.

This is MySQL 4.0.18-5 from Debian testing on a dual Xeon 1.8Ghz with 512
ram and hardware raid5. Load from other services on this machine is minimal.
There is no other MySQL traffic at this time.

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?


-- Jacob Elder

Jacob,
Are you sure you're not running it on a 286? There is no way it should take that long. I just did a Select on 9.6 million rows on a Char(17) index that took only 90ms and my record length is much larger than yours. Try running the query on the MySQL server instead of going over the network to see if that helps. If you get the same slow speed, export the data and table structure to ASCII using MySQLDump and copy the dump over to another computer and install MySQL on that. Load the file to reconstruct the table. You should be getting query speeds in just a few ms. The problem could be hardware which will show up if the second computer is faster than the one you're using now.


Mike


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


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



Reply via email to