本地无法设置ob_vector_memory_limit_percentage

【 使用环境 】测试环境
【 OB 】
【 使用版本 】OceanBase 版本: 5.7.25-OceanBase_CE-v4.3.5.1
【问题描述】
我想使用本地docker部署的OB,
def create_database(database_name: str = “search_rag”) → None:
conn = MySQLdb.connect(
host=“127.0.0.1”,
port=3306,
user=“root”
)
conn.autocommit(True)
cursor = conn.cursor()
try:
cursor.execute(f"CREATE DATABASE IF NOT EXISTS {database_name};")
cursor.execute(“SET GLOBAL ob_vector_memory_limit_percentage = 35”)
cursor.execute(“SET GLOBAL memstore_limit = 80”)
print(f"[OK] 数据库 {database_name} 创建或已存在")
except MySQLdb.Error as e:
print("[ERROR] 创建数据库失败:", e)

(1193, “Unknown system variable ‘ob_vector_memory_limit_percentage’\n[172.17.0.5:2882] [2025-05-08 13:00:50.671479] [YB42AC110005-0006349B711A021C-0-0]”)

1 个赞

使用:
alter system set ob_vector_memory_limit_percentage = 30