[MDEV-33409] icp for k-ANN graph searches Created: 2024-02-07  Updated: 2024-02-07

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Fix Version/s: None

Type: Task Priority: Major
Reporter: Sergei Golubchik Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-33406 basic optimizer support for k-NN sear... In Progress
Relates
relates to MDEV-32887 k-ANN indexes for vectors In Progress
relates to MDEV-33412 cost-based optimizer choice for k-NN ... Open

 Description   

After the implementation of MDEV-33408:

Modify the basic graph search algorithm to support index condition pushdown. That is, only add nodes to the candidate result set that pass the WHERE clause.

This will allow queries of the form:

SELECT *
FROM table
WHERE cond(table.column) == true
ORDER BY VEC_DISTANCE(table.emb, target_vec)
LIMIT 10

to take advantage of the index.

This will have the following edge cases:

  • What if none of the neighbors of the upper layer pass the where clause?
  • What if none of the neighbors in the search pass the where clause, but if we had only considered nodes that did pass (nodes that were never explored in this search), we would have found a valid result set.

Generated at Thu Feb 08 10:38:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.