Skip to content

[Bug]: IVFFLAT Search is slow with 5 billion vector index. #23771

@cpegeric

Description

@cpegeric

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

94128cd

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Image

I saw search mainly use single thread to run instead of using 64 CPUs.

The slowest part is running the table scan of the secondary index.

		sql := fmt.Sprintf("SELECT `%s` FROM `%s`.`%s` WHERE `%s` = %d AND `%s` IN (%s)",
			catalog.SystemSI_IVFFLAT_TblCol_Entries_pk,
			tblcfg.DbName, tblcfg.EntriesTable,
			catalog.SystemSI_IVFFLAT_TblCol_Entries_version,
			idx.Version,
			catalog.SystemSI_IVFFLAT_TblCol_Entries_id,
			instr,
		)

Expected Behavior

Try to use multi-threads to run distance function. Try to use the Brute-Force index with multiple threads support. pkg/vectorindex/brute-force

Steps to Reproduce

create 5 billion vector ivfflat index
with configuration
lists 7202
vector_l2_ops

and do search.

Let me know I can give you access to aws.

Additional information

No response

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't workingseverity/s0Extreme impact: Cause the application to break down and seriously affect the use

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions