kenford@stripped wrote:
> mysql> EXPLAIN select dom_country from url_info_tb where dom_country='com';
> +-------------+------+---------------+------+---------+------+--------+-----
> -------+
> | table | type | possible_keys | key | key_len | ref | rows |
> Extra |
> +-------------+------+---------------+------+---------+------+--------+-----
> -------+
> | url_info_tb | ALL | NULL | NULL | NULL | NULL | 991851 |
> where used |
> +-------------+------+---------------+------+---------+------+--------+-----
> -------+
> 1 row in set (0.21 sec)
>
> At 03:50 PM 5/25/99 -0400, you wrote:
> >kenford@stripped wrote:
> >>
> >> 1. I'm trying to build a search engine using mysql, what can I do to
> >> have mysql be very fast multi cpu, lots of memory, clustering what?
> >>
> >> 2. Is it normal for mysql to take this long to do a search with just
> >> 900,000 documents, what about when I have say 10-20,000,000 documents it
> would
> >> take for ever.
> >>
> >> mysql> select count(dom_country) from url_info_tb;
> >> +--------------------+
> >> | count(dom_country) |
> >> +--------------------+
> >> | 991851 |
> >> +--------------------+
> >> 1 row in set (0.02 sec)
> >>
> >> 2.
> >> mysql> select dom_country from url_info_tb where dom_country='edu';
> >>
> >> | edu |
> >> | edu |
> >> | edu |
> >> | edu |
> >> | edu |
> >> +-------------+
> >> 80 rows in set (34.39 sec)
> >
EXPLAIN tells you that you don't have an index on dom_country.
Try this:
mysql> alter table url_info_tb add index dom_country_index (dom_country);
If it complains about 'dom_country' not being defined as NOT NULL, use this
first:
mysql> alter table url_info_tb modify column dom_country char(11) not null; #
or whatever length dom_country should be
Regards,
--
Dan Koch
Webmaster
American City Business Journals
http://www.amcity.com/