Enhancing Db2 semantic queries with the vector prefetch capability of SQL Data Insights

 View Only

Enhancing Db2 semantic queries with the vector prefetch capability of SQL Data Insights 

Tue March 07, 2023 07:15 PM

SQL Data Insights (SQL DI) was introduced in Db2 13 for z/OS, which brought artificial intelligence (AI) functionality to the Db2 engine. This new feature provided the capability to run SQL AI queries to find valuable insights hidden in your Db2 data and help you make better business decisions.

SQL DI prepares AI functions by generating numeric vectors for each unique value it discovers in a Db2 table during model training. When the built-in AI functions are used against a large number of vectors (i.e., large number of distinct values per column), the current AI query process could result in less than ideal query performance because the vectors in the model table are processed row by row for scoring calculation.

The latest SQL DI enhancement improves the query processing by prefetching vectors in batches for scoring calculation and saving the scores in a cache. Along with other updates, such as the code path length optimization of the built-in functions, the vector prefetch capability can significantly improve the processing of SQL DI AI queries and the overall scoring performance.

Statistics

0 Favorited
67 Views
1 Files
0 Shares
22 Downloads
Attachment(s)
pdf file
SQLDI_VectorPrefetch_Performance_paper_final.pdf   392 KB   1 version
Uploaded - Tue September 05, 2023