Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35755

will mariadb vector indexes support ef_construction parameter?

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • N/A
    • Vector search
    • None

    Description

      HNSW supports M and ef_construction at index create time (see here) and they are exposed as session variables for pgvector (see here).

      Currently, MariaDB lets you set M but does not let you set ef_construction. Support was there in this PR (also see here) but I don't know what happened since then.

      Attachments

        Activity

          serg Sergei Golubchik added a comment - - edited
          serg Sergei Golubchik added a comment - - edited No, it's hard-coded and not configurable https://github.com/MariaDB/server/blob/main/sql/vector_mhnsw.cc#L33
          mdcallag Mark Callaghan added a comment - - edited

          That should be explained in the docs because that is one of the basic configuration options for HNSW and anyone new to MariaDB will be confused. Also, pgvector requires ef_construction to be >= 2 * M. I am not sure if other implementations have the same requirement, but if I am to follow that guidance for MariaDB then I am limited to M <= 5.

          mdcallag Mark Callaghan added a comment - - edited That should be explained in the docs because that is one of the basic configuration options for HNSW and anyone new to MariaDB will be confused. Also, pgvector requires ef_construction to be >= 2 * M. I am not sure if other implementations have the same requirement, but if I am to follow that guidance for MariaDB then I am limited to M <= 5.

          People

            serg Sergei Golubchik
            mdcallag Mark Callaghan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.