Abstract
A method is provided for optimizing query performance by transforming an artificial intelligence (AI) join task into an AI classification task. The method comprises receiving a request to join a first table and a second table using an AI filter applicable to values of a first column of the first table and a selected column of the second table. A modified query is generated to perform the join with the AI classification task by performing, for each row in the first table, the AI classification function with the value from the first column and the values from the selected column. The AI classification function is configured to determine, in a single inference call, which candidate values from the selected column that are relevant to the value from the first column in the row. The method also includes performing the modified query and outputting a result from performing the modified query.