PolarDB数据库语句正常,但是执行会锁等待,怎么回事?UPDATE exa_questionnaire SET title='风湿7月出科考核',
creator='b5d092ef4ffc4576a3d2623a9dc0dc33',
update_time='2024-07-19 22:07:52.867',
question_count=100,
category_id='
total_points=100.0,
time_limit=1 WHERE id='
CREATE TABLE exa_questionnaire
(
id
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '试卷ID',
questionnaire_sequence
int(11) NOT NULL AUTO_INCREMENT COMMENT '试卷序号(自增不重复)',
title
varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '试卷标题',
types
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '试卷类型(1正式考试、2同步测验、3出科考核)',
generate_type
tinyint(1) unsigned NOT NULL COMMENT '组卷类型(1选题组卷、2抽题组卷、3随机组卷、4以卷组卷、5智能组卷、6自动组卷)',
create_type
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '创建类型(1新建卷创建、2复制创建、3规则创建、4导入创建、5试卷库创建、6分配创建)',
answer_mode
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '试卷答题模式:1-常规模式,2-竞赛模式,3-抢答模式',
tissue_id
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '组织ID',
tissue_name
varchar(0) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '试卷生成事件描述',
department_id
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '部门Id',
tissue_type
tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '组织类型',
creator
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人',
create_time
datetime NOT NULL COMMENT '创建时间',
updator
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '修改人',
update_time
timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
audit_status
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '审核状态(0未审核,1审核通过,2审核未过)',
auditor
char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '审核人',
audit_time
datetime DEFAULT NULL COMMENT '审核时间',
del_status
tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除(0否,1是)',
exam_status
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '考试状态:1未开始,2考试中,3已结束',
question_count
smallint(4) unsigned NOT NULL DEFAULT '0' COMMENT '试卷题目数量',
archive_status
tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已归档(0否,1是)',
source
varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '来源:操作平台类型',
user_IP
varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '操作者IP',
device_info
varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '设备信息,如:浏览器、手机等',
select_scope
tinyint(1) unsigned NOT NULL DEFAULT '3' COMMENT '抽题设置(1所有库、2系统、3自建库)',
category_id
char(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '考试分类:自定义的Category',
total_points
decimal(6,2) NOT NULL DEFAULT '0.00' COMMENT '试卷总分数',
time_limit
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '答题时间限制类型:1整卷限制时长,2单题限制时长',
duration
mediumint(9) unsigned NOT NULL DEFAULT '0' COMMENT '时长:单位分钟',
randoms
tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '卷下的试题是否支持乱序:true是,false否',
amout_set
tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '试卷的试题乱序数量',
reallocate
tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否排重: 默认true排重,flase不排重',
templet_id
varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模板Id,只有一份试卷的与id相同,如果有多份试卷则为第一份试卷id',
encrypt
bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '是否加密试卷 0不加密,1加密',
lock_password
char(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '加密密码',
parent_id
char(32) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '该试卷被复制、分配的试卷id',
remark
varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',
PRIMARY KEY (id
),
KEY questionnaire_sequence
(questionnaire_sequence
),
KEY findListIndex
(templet_id
),
KEY questionnaire_select_1
(tissue_id
,del_status
,parent_id
,title
)
) ENGINE=InnoDB AUTO_INCREMENT=1065720 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='试卷表';
手动执行能复现的话,可以直连主地址,执行下看看 select * from information_schema.innodb_trx order by trx_started desc\G
此回答整理自钉群“PolarDB 专家面对面 - 网络&连接&线程池功能”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云关系型数据库主要有以下几种:RDS MySQL版、RDS PostgreSQL 版、RDS SQL Server 版、PolarDB MySQL版、PolarDB PostgreSQL 版、PolarDB分布式版 。