SELECT * FROM /.*/ LIMIT 1 SELECT * FROM cpu_load_short SELECT * FROM cpu_load_short WHERE value > 0.9
查询/修改RETENTION
1 2 3 4
SHOW RETENTION POLICIES ON "mydb" 单位有 w/d/h/s ALTER RETENTION POLICY "autogen" ON "mydb" DURATION 100d DEFAULT ALTER RETENTION POLICY "autogen" ON "mydb" DURATION 0s DEFAULT
用户管理
1 2 3 4 5 6 7 8
显示用户 SHOW USERS 创建用户 CREATE USER "username" WITH PASSWORD 'password' 创建管理员权限的用户 CREATE USER "username" WITH PASSWORD 'password' WITH ALL PRIVILEGES 删除用户 DROP USER "username"
curl -G 'http://localhost:8086/query' --data-urlencode "db=mydb" --data-urlencode "epoch=s" --data-urlencode "q=SELECT value FROM cpu_load_short WHERE region='us-west'"
指定每次查询数据大小
chunk_size
1
curl -G 'http://localhost:8086/query' --data-urlencode "db=mydb" --data-urlencode "chunk_size=200" --data-urlencode "q=SELECT value FROM cpu_load_short WHERE region='us-west'"
#! /bin/sh -x # # chkconfig: 2345 80 05 # description: start and stop Oracle Database Enterprise Edition on Oracle Linux 5 and 6 #
# In /etc/oratab, change the autostart field from N to Y for any # databases that you want autostarted. # # Create this file as /etc/init.d/dbora and execute: # chmod 750 /etc/init.d/dbora # chkconfig --add dbora # chkconfig dbora on
# Note: Change the value of ORACLE_HOME to specify the correct Oracle home # directory for your installation. # ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 ORACLE_HOME=/app/oracle/product/11.2.0
# # Note: Change the value of ORACLE to the login name of the oracle owner ORACLE=oracle