我为Drupal网站启用了慢速查询,以下是前10个慢查询。关于如何找到他们的来源或来源的任何想法
Reading mysql slow query log from /var/log/mysql/mysql-slow.log
Count: 1 Time=220.72s (220s) Lock=0.00s (0s) Rows=14293563.0 (14293563), root[root]@localhost
SELECT /*!N SQL_NO_CACHE */ * FROM `sessions`
Count: 1 Time=42.62s (42s) Lock=0.00s (0s) Rows=4181557.0 (4181557), root[root]@localhost
SELECT /*!N SQL_NO_CACHE */ * FROM `search_index`
Count: 1 Time=28.26s (28s) Lock=0.00s (0s) Rows=1.0 (1), exdigital[exdigital]@[10.200.1.1]
SELECT * FROM term_data WHERE tid IN (N)
Count: 1 Time=27.87s (27s) Lock=0.00s (0s) Rows=7.0 (7), exdigital[exdigital]@[10.200.1.1]
SELECT * FROM nodewords WHERE type = N AND id = N
Count: 6 Time=19.98s (119s) Lock=0.08s (0s) Rows=1.0 (6), exdigital[exdigital]@[10.200.1.1]
SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = N
LEFT JOIN term_node term_node_value_13 ON node.vid = term_node_value_13.vid AND term_node_value_13.tid = N
LEFT JOIN term_node term_node_value_14 ON node.vid = term_node_value_14.vid AND term_node_value_14.tid = N
LEFT JOIN term_node term_node_value_15 ON node.vid = term_node_value_15.vid AND term_node_value_15.tid = N
LEFT JOIN term_node term_node_value_16 ON node.vid = term_node_value_16.vid AND term_node_value_16.tid = N
LEFT JOIN term_node term_node_value_17 ON node.vid = term_node_value_17.vid AND term_node_value_17.tid = N
LEFT JOIN term_node term_node_value_18 ON node.vid = term_node_value_18.vid AND term_node_value_18.tid = N
LEFT JOIN term_node term_node_value_19 ON node.vid = term_node_value_19.vid AND term_node_value_19.tid = N
LEFT JOIN term_node term_node_value_20 ON node.vid = term_node_value_20.vid AND term_node_value_20.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N OR term_node_value_12.tid = N OR term_node_value_13.tid = N OR term_node_value_14.tid = N OR term_node_value_15.tid = N OR term_node_value_16.tid = N OR term_node_value_17.tid = N OR term_node_value_18.tid = N OR term_node_value_19.tid = N OR term_node_value_20.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N) count_alias
Count: 13 Time=19.47s (253s) Lock=0.03s (0s) Rows=1.0 (13), exdigital[exdigital]@[10.200.1.1]
SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = N
LEFT JOIN term_node term_node_value_13 ON node.vid = term_node_value_13.vid AND term_node_value_13.tid = N
LEFT JOIN term_node term_node_value_14 ON node.vid = term_node_value_14.vid AND term_node_value_14.tid = N
LEFT JOIN term_node term_node_value_15 ON node.vid = term_node_value_15.vid AND term_node_value_15.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N OR term_node_value_12.tid = N OR term_node_value_13.tid = N OR term_node_value_14.tid = N OR term_node_value_15.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N) count_alias
Count: 5 Time=17.67s (88s) Lock=0.00s (0s) Rows=3.0 (15), exdigital[exdigital]@[10.200.1.1]
SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = N
LEFT JOIN term_node term_node_value_13 ON node.vid = term_node_value_13.vid AND term_node_value_13.tid = N
LEFT JOIN term_node term_node_value_14 ON node.vid = term_node_value_14.vid AND term_node_value_14.tid = N
LEFT JOIN term_node term_node_value_15 ON node.vid = term_node_value_15.vid AND term_node_value_15.tid = N
LEFT JOIN term_node term_node_value_16 ON node.vid = term_node_value_16.vid AND term_node_value_16.tid = N
LEFT JOIN term_node term_node_value_17 ON node.vid = term_node_value_17.vid AND term_node_value_17.tid = N
LEFT JOIN term_node term_node_value_18 ON node.vid = term_node_value_18.vid AND term_node_value_18.tid = N
LEFT JOIN term_node term_node_value_19 ON node.vid = term_node_value_19.vid AND term_node_value_19.tid = N
LEFT JOIN term_node term_node_value_20 ON node.vid = term_node_value_20.vid AND term_node_value_20.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N OR term_node_value_12.tid = N OR term_node_value_13.tid = N OR term_node_value_14.tid = N OR term_node_value_15.tid = N OR term_node_value_16.tid = N OR term_node_value_17.tid = N OR term_node_value_18.tid = N OR term_node_value_19.tid = N OR term_node_value_20.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N, N
Count: 24 Time=13.51s (324s) Lock=0.00s (0s) Rows=2.9 (70), exdigital[exdigital]@[10.200.1.1]
SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N, N
Count: 12 Time=11.31s (135s) Lock=0.71s (8s) Rows=1.0 (12), exdigital[exdigital]@[10.200.1.1]
SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = N
LEFT JOIN term_node term_node_value_13 ON node.vid = term_node_value_13.vid AND term_node_value_13.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N OR term_node_value_12.tid = N OR term_node_value_13.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N) count_alias
Count: 23 Time=10.95s (251s) Lock=0.40s (9s) Rows=1.0 (23), exdigital[exdigital]@[10.200.1.1]
SELECT COUNT(*) FROM (SELECT DISTINCT(node.nid) AS nid,
node.vid AS node_vid,
node.title AS node_title,
node.created AS node_created
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN term_node term_node_value_0 ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
LEFT JOIN term_node term_node_value_1 ON node.vid = term_node_value_1.vid AND term_node_value_1.tid = N
LEFT JOIN term_node term_node_value_2 ON node.vid = term_node_value_2.vid AND term_node_value_2.tid = N
LEFT JOIN term_node term_node_value_3 ON node.vid = term_node_value_3.vid AND term_node_value_3.tid = N
LEFT JOIN term_node term_node_value_4 ON node.vid = term_node_value_4.vid AND term_node_value_4.tid = N
LEFT JOIN term_node term_node_value_5 ON node.vid = term_node_value_5.vid AND term_node_value_5.tid = N
LEFT JOIN term_node term_node_value_6 ON node.vid = term_node_value_6.vid AND term_node_value_6.tid = N
LEFT JOIN term_node term_node_value_7 ON node.vid = term_node_value_7.vid AND term_node_value_7.tid = N
LEFT JOIN term_node term_node_value_8 ON node.vid = term_node_value_8.vid AND term_node_value_8.tid = N
LEFT JOIN term_node term_node_value_9 ON node.vid = term_node_value_9.vid AND term_node_value_9.tid = N
LEFT JOIN term_node term_node_value_10 ON node.vid = term_node_value_10.vid AND term_node_value_10.tid = N
LEFT JOIN term_node term_node_value_11 ON node.vid = term_node_value_11.vid AND term_node_value_11.tid = N
LEFT JOIN term_node term_node_value_12 ON node.vid = term_node_value_12.vid AND term_node_value_12.tid = N
LEFT JOIN domain_access domain_access ON node.nid = domain_access.nid
INNER JOIN node_access na ON na.nid = node.nid LEFT JOIN node n ON node.nid = n.nid WHERE (na.grant_view >= N AND ((na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S') OR (na.gid = N AND na.realm = 'S'))) AND ((n.moderate != N)) AND ( (node.moderate = N) AND (node.status <> N) AND (term_data.vid in ('S', 'S', 'S', 'S', 'S')) AND (node.nid != N) AND (term_node_value_0.tid = N OR term_node_value_1.tid = N OR term_node_value_2.tid = N OR term_node_value_3.tid = N OR term_node_value_4.tid = N OR term_node_value_5.tid = N OR term_node_value_6.tid = N OR term_node_value_7.tid = N OR term_node_value_8.tid = N OR term_node_value_9.tid = N OR term_node_value_10.tid = N OR term_node_value_11.tid = N OR term_node_value_12.tid = N) AND (domain_access.gid = 'S')
)GROUP BY nid
ORDER BY node_created DESC
LIMIT N) count_alias
如果你建议一些可以回溯查询所使用的视图或模块的工具,那将会有所帮助;提供是否存在这样的事情。如果查看查询会产生共鸣,请写评论。
非常感谢..
答案 0 :(得分:5)
我不会太担心那些只发生过一次的事情。大多数只是SELECT * FROM big_table
,最有可能是通过一些管理员完成的。我不确定什么会获取整个会话表,这对我来说并不是很有用。
无论如何,多次出现的其他查询很可能是由视图生成的:
LEFT JOIN term_node term_node_value_0
ON node.vid = term_node_value_0.vid AND term_node_value_0.tid = N
执行其中20个连接会减慢任何查询速度,这也是查看视图的原因。视图使得通用查询不知道您真正想要做什么。所以它可以做出任何假设,这就是为什么它在某些情况下可以做出像这样的疯狂查询。唯一的解决方法是自定义代码视图或仅代替查询。当事情有点复杂时,视图很难对术语进行良好的查询,因为术语具有1对多的关系(1个术语可以与节点相关联)。
因此,请查看您拥有的视图,您可以使用视图UI中的缓存处理此视图。
答案 1 :(得分:1)
安装并启用devel模块。
导航至模块设置页面(example.com/admin/settings/devel)并检查
这会将页面请求的每个查询写入页面底部,并告诉您编写查询的函数(where列)。函数名称是moduleName_functionName。
googletorp完全正确。
答案 2 :(得分:1)
Nodewords 1.14应该运行得更好,内部缓存已添加,因此它不会像以前那样重新运行相同的查询。
主要罪魁祸首似乎是Views taxonomy术语页面查询,它默认检查九个级别的递归以识别匹配的内容。您应该将视图的“深度”参数更改为词汇表(类别,标签等)实际使用的最大层次结构深度,如果您根本不使用术语层次结构,则应将深度设置为0或更好,完全删除术语id + depth参数,并将其替换为基本术语id参数。