0

After searching TDengine online documentation: https://www.taosdata.com/en/documentation/, I found the the command to change the default database parameter "keep", which indicates how long data will be preserved in databases. However after I have typed in that command from shell, "show variables" command still shows the old value. How would I know if changing this parameter is taking effect?

taos> alter database test keep 50;
Query OK, 0 of 0 row(s) in database (0.019087s)
taos> show variables;
           name           |             value              |
============================================================
 version                  | 2.1.5.0                        |
 buildinfo                | Built at 2021-08-05 23:49:17   |
 walLevel                 | 1                              |
 comp                     | 2                              |
 precision                | 0                              |
 maxRows                  | 4096                           |
 minRows                  | 100                            |
 keep                     | 3650                           |
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
GeorgeWill93
  • 167
  • 5

1 Answers1

0

the alter command is effective at the DataBase level, and show varibles is show the global parameters. you can use show databases; to check the database's parameter.

if you want change the show variables;'s show, you should modify the config file /etc/taos.cfg

and there are only serval parameters can modify by alter command.

DDDBA
  • 11
  • 2