8. A volatile or non-volatile machine-readable storage medium storing one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform: monitoring which queries are submitted during a plurality of sessions; forming an affinity set for a particular query that represents said string, wherein the affinity set for said particular query includes one or more other queries that were submitted in a same session as said particular query; identifying, within the affinity set, which of the one or more other queries represent one or more sub-strings of the string; for each sub-string of the plurality of sub-strings, determining a first number of sessions, of said plurality of sessions, that include at least one query that represents the string and at least one query that represents the sub-string but not the string; determining a second number of sessions, of said plurality of sessions, that include at least one query that represents the sub-string and no queries that represent the string; determining which sub-string, of said plurality of sub-strings, are logically related to said string based, at least in part, on both the first number of sessions and the second number of sessions.
14. A volatile or non-volatile machine-readable storage medium as recited in claim 8 , wherein the one or more other queries are other queries that satisfy a threshold degree of affinity to said particular query, wherein, for each of the other queries, a degree of affinity comprises a ratio of (a) a third number of sessions that include both said particular query and the other query to (b) a fourth number of sessions that include either said particular query or the other query but not both; and wherein the one or more sequences of instructions, when executed by the one or more processors, causes the one or more processors to perform: forming a splits dictionary entry for said string based on said affinity set by removing from the affinity set any queries that do not represent sub-strings of the string.