TiDB中文技术文档作用域 说明 autocommit GLOBAL \ SESSION 是否自动 Commit 事务 sql_mode GLOBAL \ SESSION 支持部分 MySQL SQL mode, time_zone GLOBAL \ SESSION 数据库所使用的时区 tx_isolation GLOBAL \ SESSION 事务隔离级别 系统变量 设置系统变量 全局范围值 会话范围值 TiDB 支持的 时区 TiDB 使用的时区由 time_zone 全局变量和 session 变量决定。 time_zone 的初始值是机器当前的系统时区 ‘SYSTEM’ 。 在运行过程中可以修改全局时区: 1. mysql> SET GLOBAL time_zone = timezone; TiDB 还可以通过设置 session 变量 time_zone 为每个连接维护各自的时区。默认条件下,这个值取的是全局 为每个连接维护各自的时区。默认条件下,这个值取的是全局 变量 time_zone 的值。修改 session 使用的时区: 1. mysql> SET time_zone = timezone; 查看当前使用的时区的值: 1. mysql> SELECT @@global.time_zone, @@session.time_zone; 设置 time_zone 的值的格式: ‘SYSTEM’ 表明使用系统时间 相对于 UTC0 码力 | 444 页 | 4.89 MB | 6 月前3
分布式NewSQL数据库TiDB© 2012-2021 UCloud 优刻得 117/120 当前实例创建完成后,默认时区为UTC时间,如果⽤⼾需要CST时间,需要⼿动设置时区+8 SET time_zone = '+8:00'; SET GLOBAL time_zone ='+8:00'; 重新连接mysql即可⽣效 Q12:查看 查看TiDB创建索引的过程是否已经结束 创建索引的过程是否已经结束 通过“admin show ddl;”语句查看当前job的进度0 码力 | 120 页 | 7.42 MB | 6 月前3
TiDB v5.1 DocumentationSupport The time zone in TiDB is decided by the global time_zone system variable and the ses- sion time_zone system variable. The default value of time_zone is SYSTEM. The actual time zone corresponding to System statement to set the global server time_zone value at runtime: SET GLOBAL time_zone = timezone; Each client has its own time zone setting, given by the session time_zone variable. Initially, the session session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: SET time_zone = timezone; You can use the following statement to view the0 码力 | 2745 页 | 47.65 MB | 1 年前3
TiDB v5.3 DocumentationSupport The time zone in TiDB is decided by the global time_zone system variable and the ses- sion time_zone system variable. The default value of time_zone is SYSTEM. The actual time zone corresponding to System statement to set the global server time_zone value at runtime: SET GLOBAL time_zone = timezone; 281 Each client has its own time zone setting, given by the session time_zone variable. Initially, the session session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: SET time_zone = timezone; You can use the following statement to view0 码力 | 2996 页 | 49.30 MB | 1 年前3
TiDB v5.2 DocumentationSupport The time zone in TiDB is decided by the global time_zone system variable and the ses- sion time_zone system variable. The default value of time_zone is SYSTEM. The actual time zone corresponding to System statement to set the global server time_zone value at runtime: SET GLOBAL time_zone = timezone; Each client has its own time zone setting, given by the session time_zone variable. Initially, the session session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: 264 SET time_zone = timezone; You can use the following statement to view0 码力 | 2848 页 | 47.90 MB | 1 年前3
TiDB v5.2 中文手册在恢复数据的时候会占用大量集群资源,事实上并行恢复能获得的速度提升也非常有限。 • 多个 BR 并行恢复的场景没有经过测试,无法保证成功。 6.4 时区支持 TiDB 使用的时区由 time_zone 全局变量和 session 变量决定。time_zone 的默认值是 System,System 对应的实 际时区在 TiDB 集群 bootstrap 初始化时设置。具体逻辑如下: • 优先使用 TZ 环境变量 • 作为系统时区。 在运行过程中可以修改全局时区: SET GLOBAL time_zone = timezone; TiDB 还可以通过设置 session 变量 time_zone 为每个连接维护各自的时区。默认条件下,这个值取的是全局变 量 time_zone 的值。修改 session 使用的时区: SET time_zone = timezone; 使用以下 SQL 语句查看当前全局时区、客户端时区和系统时区的值: 语句查看当前全局时区、客户端时区和系统时区的值: SELECT @@global.time_zone, @@session.time_zone, @@global.system_time_zone; 设置 time_zone 的值的格式: • ‘SYSTEM’ 表明使用系统时间 • 相对于 UTC 时间的偏移,比如 ‘+10:00’ 或者 ‘-6:00’ • 某个时区的名字,比如 ‘Europe/Helsinki’,‘US/Eastern’0 码力 | 2259 页 | 48.16 MB | 1 年前3
TiDB v5.1 中文手册ANALYZE,TiDB 会因统计信息不准确而选不中最优化的执行计划。如果查询性能不是重点关 注项,可以忽略 ANALYZE。 196 6.4 时区支持 TiDB 使用的时区由 time_zone 全局变量和 session 变量决定。time_zone 的默认值是 System,System 对应的实 际时区在 TiDB 集群 bootstrap 初始化时设置。具体逻辑如下: • 优先使用 TZ 环境变量 • 作为系统时区。 在运行过程中可以修改全局时区: SET GLOBAL time_zone = timezone; TiDB 还可以通过设置 session 变量 time_zone 为每个连接维护各自的时区。默认条件下,这个值取的是全局变 量 time_zone 的值。修改 session 使用的时区: SET time_zone = timezone; 查看当前使用的时区的值: SELECT SELECT @@global.time_zone, @@session.time_zone; 设置 time_zone 的值的格式: • ‘SYSTEM’ 表明使用系统时间 • 相对于 UTC 时间的偏移,比如 ‘+10:00’ 或者 ‘-6:00’ • 某个时区的名字,比如 ‘Europe/Helsinki’,‘US/Eastern’ 或 ‘MET’ NOW() 和 CURTIME() 的返回值都受到时区设置的影响。0 码力 | 2189 页 | 47.96 MB | 1 年前3
TiDB v5.4 DocumentationSupport The time zone in TiDB is decided by the global time_zone system variable and the ses- sion time_zone system variable. The default value of time_zone is SYSTEM. The actual time zone corresponding to System statement to set the global server time_zone value at runtime: SET GLOBAL time_zone = timezone; 371 Each client has its own time zone setting, given by the session time_zone variable. Initially, the session session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: SET time_zone = timezone; You can use the following statement to view0 码力 | 3650 页 | 52.72 MB | 1 年前3
TiDB v5.3 中文手册在恢复数据的时候会占用大量集群资源,事实上并行恢复能获得的速度提升也非常有限。 • 多个 BR 并行恢复的场景没有经过测试,无法保证成功。 6.4 时区支持 TiDB 使用的时区由 time_zone 全局变量和 session 变量决定。time_zone 的默认值是 System,System 对应的实 际时区在 TiDB 集群 bootstrap 初始化时设置。具体逻辑如下: • 优先使用 TZ 环境变量 • 作为系统时区。 在运行过程中可以修改全局时区: SET GLOBAL time_zone = timezone; TiDB 还可以通过设置 session 变量 time_zone 为每个连接维护各自的时区。默认条件下,这个值取的是全局变 量 time_zone 的值。修改 session 使用的时区: SET time_zone = timezone; 使用以下 SQL 语句查看当前全局时区、客户端时区和系统时区的值: 语句查看当前全局时区、客户端时区和系统时区的值: SELECT @@global.time_zone, @@session.time_zone, @@global.system_time_zone; 设置 time_zone 的值的格式: 216 • ‘SYSTEM’ 表明使用系统时间 • 相对于 UTC 时间的偏移,比如 ‘+10:00’ 或者 ‘-6:00’ • 某个时区的名字,比如 ‘Europe/H0 码力 | 2374 页 | 49.52 MB | 1 年前3
TiDB v6.1 DocumentationSupport The time zone in TiDB is decided by the global time_zone system variable and the ses- sion time_zone system variable. The default value of time_zone is SYSTEM. The actual time zone corresponding to System statement to set the global server time_zone value at runtime: SET GLOBAL time_zone = timezone; Each client has its own time zone setting, given by the session time_zone variable. Initially, the session session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: SET time_zone = timezone; You can use the following statement to view the0 码力 | 4487 页 | 84.44 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













