At 13:59 09/10/99 GMT, Steven Fletcher wrote:
>mysql> Select * From companies Where ((type like 'museum%') ) AND ( add1
>LIKE 'salford%' OR add2 LIKE 'salford%' OR add3 LIKE 'salford%' OR add4
>LIKE 'salford%' OR district LIKE 'salford%' OR town LIKE 'salford%' OR
>county LIKE 'salford%' ) limit 50;
This is totally Off Topic since its a question about database design rather
Its difficult to optimize all those LIKE clauses, also MySQL has trouble
coping with ORed conditions. You have a lot of indices which will never get
used by queries like this.
Try forcing a little more structure on your address e.g.:
Also, since you already have a large dataset which isn't in this form, try
searching on a range of postcodes. Don't use wildcards.