title: Split a string to its subwords
body: <hr>
  
  <p>Every letter has a value<br>
  a &nbsp;b &nbsp;c &nbsp;d &nbsp;e &nbsp;f &nbsp;g &nbsp;h &nbsp;i &nbsp;&nbsp;j &nbsp;&nbsp;&nbsp;k &nbsp;&nbsp;&nbsp;l &nbsp;&nbsp;m &nbsp;&nbsp;n &nbsp;&nbsp;o &nbsp;&nbsp;p &nbsp;&nbsp;q &nbsp;&nbsp;r &nbsp;&nbsp;&nbsp;s &nbsp;&nbsp;t &nbsp;&nbsp;u &nbsp;&nbsp;&nbsp;v &nbsp;&nbsp;w &nbsp;&nbsp;x &nbsp;&nbsp;y &nbsp;&nbsp;z<br>
  1 &nbsp;2 &nbsp;3 &nbsp;4 &nbsp;5 &nbsp;6 7 &nbsp;8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  </p>
  
  <hr>
  
  <p>TableA<br>
  String &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Length &nbsp;&nbsp;&nbsp;Value &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subwords<br>
  exampledomain &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;13 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;132 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#example-domain#example-do-main#<br>
  creditcard &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;10 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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Explanation</strong><br>
  TableA has string based over milion rows, and it will be new added 100k rows/daily to tableA.<br>
  And also "string" column has no whitespaces  </p>
  
  <p>TableB has words based over milion rows,there is every letter and words in 1-2 languages  </p>
  
  <p><strong>What i want to do</strong><br>
  i want to split strings in TableA to its subwords, as you see in example; "creditcard" i search in TableB all words and try to find which words when comes together matches the string  </p>
  
  <p><strong>What i did,and couldnt solve my question</strong><br>
  i took the string and JOIN the TableB with <strong>INNER JOINS</strong> i made 2-3 times INNER JOINS because there can be 3word 4word strings too, and that WORKED!! but it takes too much time even doing it for 100-200 strings. Guess i want to do it for 100k/everyday???  </p>
  
  <p><strong>Now what i try to do</strong><br>
  i gave values to everyletter as you see above,<br>
  Took the strings one by one and from their including letters i count the value of strings..<br>
  And the same for the words too in TableB..<br>
  Now i have every string in TableA and everyword in TableB with their VALUES..<br>
  _<br>
  1- i will take the string,length and value of it (Exmple; creditcard - 10 - 85)<br>
  2- and make a search in TableB to find the possible words when they come together, with their SUM(length), and SUM(value) matches the strings length and value, and write theese possibilities to a new column.<br>
  At last even their sum of length and sum of values matches each other there can be some posibilities that doesnt match the whole string i will elliminate theese ones (Example; <strong>"doma-in"</strong> can be <strong>"moda-in"</strong> too and their lengths and values are same but not same words)  </p>
  
  <hr>
  
  <p>I dont know but,i guess with that value method i can solve the time proplem??? , or if there is another ways to do that, i will be gratefull taking your advices.<br>
  Thanks</p>