Seems ok to me... It seems to be checking all the rows in the explain for some reason too...
mysql> show index from ip2org; +--------+------------+----------+--------------+-------------+-----------+- ------------+----------+--------+---------+ | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +--------+------------+----------+--------------+-------------+-----------+- ------------+----------+--------+---------+ | ip2org | 1 | ip_start | 1 | ip_start | A | 2943079 | NULL | NULL | | | ip2org | 1 | ip_end | 1 | ip_end | A | 2943079 | NULL | NULL | | +--------+------------+----------+--------------+-------------+-----------+- ------------+----------+--------+---------+ -----Original Message----- From: Sergio Salvi [mailto:[EMAIL PROTECTED] Sent: Thursday, June 24, 2004 8:00 PM To: MerchantSense Cc: [EMAIL PROTECTED] Subject: Re: strange table speed issue Hi! Can you send the output of the following command? show index from ip2org; It seems you don't have an index on both fields (even though it says you have multi-field index)... []s, Sergio Salvi. On Thu, 24 Jun 2004, MerchantSense wrote: > Hi - I need some help :) > > I set up a simple mysql table: > > mysql> describe ip2org; > +----------+-------------+------+-----+---------+-------+ > | Field | Type | Null | Key | Default | Extra | > +----------+-------------+------+-----+---------+-------+ > | ip_start | bigint(20) | | MUL | 0 | | > | ip_end | bigint(20) | | MUL | 0 | | > | org | varchar(80) | | | | | > +----------+-------------+------+-----+---------+-------+ > 3 rows in set (0.00 sec) > > It's got just over 2 million rows, and is populated with integers. > > I do this: > SELECT org from ip2org where ip_start<=1094799892 and > ip_end>=1094799892; > > and it take 12 seconds...! > > all my indexes seem to be there: > mysql> explain SELECT org from ip2org where ip_start<=1094799892 and > ip_end>=1094799892; > > | table | type | possible_keys | key | key_len | ref | rows | Extra > | ip2org | ALL | ip_start,ip_end | NULL | NULL | NULL | 2943079 |where > used | > > is this normal? the fields are simple numbers, so it should be > lightning fast, no? I realize it's a big table, but it's just numbers. > this should come back instantly, no? > thanks! > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]