• You might consider removing the wildcards from the dynamic sql and allow them to be specified in the search string. That way, you could explicitly specify left based LIKE statements that would allow you to take advantage of indexes on some fields. That would certainly speed up *some* of the tests. But basically, by it's very nature, you're doing a massive amount of text based searching here so the larger the date sets, the longer the result time.

    This seems like a pretty cool script for those one-off "I wonder" kind of tests where you don't mind waiting a bit, but if you're implementing something business critical (like the credit card pattern checking example), you'll probably want to be a little more specific about what fields your testing in what tables. No doubt your application doesn't allow updating of most fields through whatever the interface is except certain textual fields. Focus on scanning only those and you'll get better results. No need to be testing date fields for possible entry of credit card numbers, right?

    Tim