Skip to content

Java: Use functions/stored procedures for calculating similarity #60

@dsgrieve

Description

@dsgrieve

The implementation of the memory nearest match API computes cosine similarity on the client side.
Is it possible to compute cosine similarity on the database side through a database function or stored procedure?
If so, withEmbeddings could be pushed to the database side (i.e., should the embeddings column be selected?)

  • Could sorting and limiting be done on the database side, too?
  • Is the extra overhead on the database a good tradeoff for less overhead in data on the wire?

Metadata

Metadata

Assignees

No one assigned

    Labels

    javaPull requests that update Java codestale

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions