What is the cardinality of the `junk` column? What does an EXPLAIN Plan show?
-----Original Message----- From: Jacob Elder To: [EMAIL PROTECTED] Sent: 5/18/04 1:22 PM Subject: Simple table, 1.7 million rows, very slow SELECTs 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 -- 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]