matrixorigin / matrixorigin/matrixone
[Bug]: ivf index auto update performance not expected
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
### Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
### Branch Name
3.0-dev
### Commit ID
05a0d1b29
### Other Environment Information
```Markdown
- Hardware parameters:
- OS type:
- Others:
```
### Actual Behavior
测试场景:100 万行数据 创建 ivf index 后查询性能(17.95ms),之后增量到150 万行,等待 10s 后查询性能 51.02ms(跑 100 条 query 取平均时间)差一倍以上,ivf index自动更新性能不符合预期
测试环境:3cn ,memcache 12G
查询 sql:SELECT id
FROM {database}.{table_name}
ORDER BY l2_distance(embedding, '{vector_str}')
LIMIT 10;
进一步定位:删除 150 万行的索引,重新创建相同的 ivf index lists,再次查询性能(43.12ms)和增量后性能差不多
增量到 150万和150 万重建 index 后中心点对比:(看起来差不多?)
[中心点对比.docx](https://github.com/user-attachments/files/24489926/default.docx)
进一步定位:分别单独创建100 万和 150 万的表查询性能对比,两者性能又差距不是很大
测试脚本:
[test_ivf.py](https://github.com/user-attachments/files/24490145/test_ivf.py)
### Expected Behavior
_No response_
### Steps to Reproduce
```Markdown
100 万增量到 150 万查询性能测试:
python test_ivf.py --host 172.16.20.163 --port 6001 --user dump --password 111 --schema test_vec_index --database test_vec_index --num-queries 100
只查询性能:python test_ivf.py --host 172.16.20.163 --port 6001 --user dump --password 111 --schema test_vec_index --database test_vec_index --query-only --num-queries 100
单独创建100 万表查询性能测试命令:
python test_ivf.py --host 172.16.20.163 --port 6001 --user dump --password 111 --schema test_vec_index --database test_vec_index --simple-test --simple-rows 1000000 --num-queries 100
单独创建150 万表查询性能测试命令:
python test_ivf.py --host 172.16.20.163 --port 6001 --user dump --password 111 --schema test_vec_index --database test_vec_index --simple-test --simple-rows 1500000 --num-queries 100
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.