I recently enabled the store-database = “_internal” in /etc/influxdb/influxdb.conf
> use _internal
Using database _internal
> show measurements
name: measurements
name
----
collectd
cq
database
httpd
queryExecutor
runtime
shard
subscriber
tsm1_cache
tsm1_engine
tsm1_filestore
tsm1_wal
write
So now I would like to delete these measurements from the “collections” database
> use "collections"."autogen"
Using database collections
Using retention policy autogen
> select count(batchesTx) from "collectd"
name: collectd
time count
---- -----
0 3109
> select * from collectd order by time desc limit 2
name: collectd
time batchesTx batchesTxFail bind bytesRx droppedPointsInvalid hostname pointsParseFail pointsRx pointsTx readFail
---- --------- ------------- ---- ------- -------------------- -------- --------------- -------- -------- --------
1516147190000000000 2732 0 :25826 868809792 1889925 db1 0 11669872 11668618 0
1516147180000000000 2731 0 :25826 868506024 1889332 db1 0 11665765 11664594 0
Running the following delete statements
> drop series from "collectd"
> select * from collectd order by time desc limit 2
name: collectd
time batchesTx batchesTxFail bind bytesRx droppedPointsInvalid hostname pointsParseFail pointsRx pointsTx readFail
---- --------- ------------- ---- ------- -------------------- -------- --------------- -------- -------- --------
1516147190000000000 2732 0 :25826 868809792 1889925 db1 0 11669872 11668618 0
1516147180000000000 2731 0 :25826 868506024 1889332 db1 0 11665765 11664594 0
>
No result, this one:
> delete from "collectd"
> select * from collectd order by time desc limit 2
name: collectd
time batchesTx batchesTxFail bind bytesRx droppedPointsInvalid hostname pointsParseFail pointsRx pointsTx readFail
---- --------- ------------- ---- ------- -------------------- -------- --------------- -------- -------- --------
1516147190000000000 2732 0 :25826 868809792 1889925 db1 0 11669872 11668618 0
1516147180000000000 2731 0 :25826 868506024 1889332 db1 0 11665765 11664594 0
No result, oow this one:
> drop measurement "collectd"
> select * from collectd order by time desc limit 2
name: collectd
time batchesTx batchesTxFail bind bytesRx droppedPointsInvalid hostname pointsParseFail pointsRx pointsTx readFail
---- --------- ------------- ---- ------- -------------------- -------- --------------- -------- -------- --------
1516147190000000000 2732 0 :25826 868809792 1889925 db1 0 11669872 11668618 0
1516147180000000000 2731 0 :25826 868506024 1889332 db1 0 11665765 11664594 0
None of the commands resulted in reporting an error, just reported nothing