为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:
【操作系统】:
【CPU】:
【问题描述】*:有一张500万数据量的表
使用以下Python程序并发1000去查询
#!/usr/bin/python3
#coding:utf-8
import dmPython
from multiprocessing import Process
PARALLEL = 100
def run_sql():
conn = dmPython.connect(user='SYSDBA', password='SYSDBA', server='localhost', port=5236)
cursor = conn.cursor()
cursor.execute('select * from xgq where id=1')
cursor.close()
conn.close()
if __name__ == '__main__':
p = {}
for x in range(PARALLEL):
p[x] = Process(target=run_sql,)
for x in range(PARALLEL):
p[x].start()
运行起来之后
select * from V$SESSION_EVENT 没有任何结果
通过打印堆栈结果如下
疑问:
1000个并发扫描500万的大表按理来说会存在一些热块的等待,但是V$SESSION_EVENT 没有结果展示,是测试方法存在问题吗
关于等待事件,可以关注达梦的后续版本
id = 1 太快, 不带条件看看
这两个参数看看有影响不
sp_set_para_value(1,‘MONITOR_SYNC_EVENT’,1);
sp_set_para_value(1,‘ENABLE_MONITOR’,1);