Hi all,

I will appreciate if someone could give me some advice.
I am going to make a 6.5 mill. phone directory database, and after some
previous advice I am able to make a search in a fraction of a second.

However there should only be a single search line, not different fields for
First, Last - name, street address, Zip code and City name.
The last name field in the database could also contain a company name.

So here is some examples

1) First Last

2) First Last City

3) First Last Street_addr city

4) First Middle Last Street_addr city

5) First Middle

6) Company

7) Company City

..

Well, there is a lot of alternatives, so the best might be a freetext.

The database looks like this:

create table subscriber
(
    id                          bigint unsigned not null auto_increment primary key,
    subscr_id                   bigint unsigned,
    telco_id                    int unsigned,
    typeid                              int unsigned,
    first                               varchar (40),
    middle                              varchar (40),
    last                                varchar (40),
    address                             varchar (40),
    postcode                  int unsigned,
    postname                    varchar (40),
    phone                               varchar (12)
);

My plan was to do the thing below, but the query was very slow:

create table subscriber
(
    id                          bigint unsigned not null auto_increment primary key,
    subscr_id                   bigint unsigned,
    telco_id                    int unsigned,
    typeid                              int unsigned,
    first                               varchar (40),
    middle                              varchar (40),
    last                                varchar (40),
    address                             varchar (40),
    postcode                  int unsigned,
    postname                    varchar (40),
    phone                               varchar (12),
    FULLTEXT                    (first, middle, last, address, postname, phone)
);

All suggestions are appreciated, thanks in advance.


Rgs
Steinar Kolnes



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to