1. A computer apparatus comprising: at least one processor; a memory coupled to the at least one processor; a database residing in the memory having a record with a beginning position; a query to the database that specifies a sequential string search of the record; a query optimizer that optimizes the query by determining a starting position other than the beginning position of the record to start the string search, wherein the starting position is determined based on a starting position table containing historical information of previous text string searches, and wherein the query optimizer determines the starting position for the search based on the position where previous queries found the string in a predetermined number of the records that match the query.