>> whats the difference between:
>> alter table tablename add index (name);
>> alter table tablename add index (age);
>> alter table tablename add index (birthdate);
>> alter table tablename add index (city);
>
>These are four INDIVIDUAL keys.. helpful if you want to search by name,
>age, birthday, _OR_ city

Will I get any performance if I were to do some complex
query like:

select * from tablename where name = 'BILL' and city = 'new york';
select * from tablename where age > 30 and city = 'seatle';
select * from tablename where age > 30 and name = 'JOHN';

or do you suggest that I add the following on top of the
previous index?
alter table tablename add index (name,city);
alter table tablename add index (age,city);
alter table tablename add index (age,name);
etc...

thanks
Jaime



database,mysql


---------------------------------------------------------------------
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