> I assume that specifying WELLFORMED will speed things up, since validation is skipped
That is correct.
> I want to know what other tweaks I can make to achieve maximum performance of the Teiid specific portions of the select.
The performance will largely be determined by the size of the input document and the XMLTABLE xquery/xpath. See XQuery Optimization · Teiid Documentation
If possible not using the descendant axes // in the context path will allow the processing to use streaming, which can greatly reduce latency/overhead.
> I'm not too clear on the difference between DOCUMENT vs CONTENT from the documentation
CONTENT allows for anything that could appear under an element - including a sequence, or even text. DOCUMENT requires that you are parsing starting at the document root / single element.
> Will I get better performance if I use a TEXTTABLE instead of a XMLTABLE?
TEXTTABLE will only be useful for fixed/delimited text.
Thanks for your response.