关于使用GDB调试社区版OB加载符号表过慢的问题

系统环境:

OS:centos7
cpu核数:

cat /proc/cpuinfo | grep "processor" | sort | uniq | wc -l
8

虚拟机OS:centos7

OB版本:

obclient [test]> select version();
+------------------------------+
| version()                    |
+------------------------------+
| 5.7.25-OceanBase_CE-v4.3.2.0 |
+------------------------------+

问题:

在使用GDB调试时,加载符号表过慢,大概需要4,5分钟。
请问这种是正常现象吗?如果是,有什么办法可以提高加载符号表的速度吗?

1 个赞

结果如下:

obclient [test]> select /*+ parallel(15) */ sql_id, elapsed_time, trace_id, substr(query_sql, 1, 6) from oceanbase.gv$ob_sql_audit where tenant_id = 1 and IS_EXECUTOR_RPC = 0 and request_time > (time_to_usec(now()) - 10000000) and request_time < time_to_usec(now()) order by elapsed_time desc limit 10;
+----------------------------------+--------------+-----------------------------------+-------------------------+
| sql_id                           | elapsed_time | trace_id                          | substr(query_sql, 1, 6) |
+----------------------------------+--------------+-----------------------------------+-------------------------+
| DBCB5D52A5E14718345165081BC7EAE4 |         5544 | YB427F000001-00061DF7689F8AD3-0-0 | select                  |
| DBCB5D52A5E14718345165081BC7EAE4 |         5130 | YB427F000001-00061DF7689F8AD4-0-0 | select                  |
| DBCB5D52A5E14718345165081BC7EAE4 |         4853 | YB427F000001-00061DF7689F8AD5-0-0 | select                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3821 | YB427F000001-00061DF769BFAC1C-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3776 | YB427F000001-00061DF769BFAC21-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3639 | YB427F000001-00061DF769BFAC0D-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3601 | YB427F000001-00061DF769BFAC0B-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3579 | YB427F000001-00061DF769BFAC23-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3563 | YB427F000001-00061DF769BFAC26-0-0 |      u                  |
| 24D486F20861EBD9E0217692DB0E9C61 |         3461 | YB427F000001-00061DF769BFAC28-0-0 |      u                  |
+----------------------------------+--------------+-----------------------------------+-------------------------+
10 rows in set (0.160 sec)
1 个赞

我的这个问题仅仅是关于使用GDB调试OB时,加载符号表过慢的问题。应该和执行什么SQL没有什么必然联系吧。

1 个赞

这个我问问其他老师 找人给你解答一下

1 个赞

好的

1 个赞

加载符号表指的是查询哪些表?没有 gdb 调试时没问题吗?

1 个赞