Figure 5. Using an SQL table-valued function for searching
The SQL table-valued function is a compromise between the SQL scalar search functions and the stored procedure search. With the SQL table-valued function you can also use a db2ext.highlight function to get information about why a document qualified as a search result.
The main functional differences to the stored procedure search are:
The main functional differences to the SQL scalar search functions are:
Use the SQL table-valued function in those cases where you would normally use an SQL scalar function, but you want to exploit text indexes on views or presorted text indexes.