MySQL Forums
Forum List  »  Newbie

Re: Optimising a String Matching query for Speed.
Posted by: Rick James
Date: June 18, 2014 03:03PM

No Arrays. Only tables.

> The table within the DB will be Indexed.

This is too vague.

> JOIN ... ON s.String = t.String

Either of the tables should have an index on (String).

> and will likely have duplicates.

OK. That is not a problem. However if there are a _lot_ of duplicates it _might_ be better to dedup first.

> and will be of varying length
> Should I convert the data type to a set length, e.g. varchar(100)

CHAR vs VARCHAR -- insignificant difference on speed. Potentially big difference in space (CHAR is fixed at full length).

Please provide SHOW CREATE TABLE for each table; that way we can better discuss the details.

Options: ReplyQuote


Subject
Written By
Posted
Re: Optimising a String Matching query for Speed.
June 18, 2014 03:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.