Im a recent convert to InfluxDB so sorry if this is a stupid question!
Is it possible to measure/record the execution time of queries? I can use libraries in python but if I want to record execution times when executing the query in the influx terminal then I cannot see a way to do this? I feel this should be logged somewhere but I cannot see any evidence of logging either although I know there should be and it appears enabled in the config file ?
True, the influx CLI does not report any timings. But if you’re on a Unix-y system, you should be able to get an approximate execution time for a query via
$ time influx -execute 'SELECT foo FROM bar WHERE time > now() - 10s'
The last field in the HTTP logs (which are enabled by default) is the duration of the request in microseconds:
@mark , Thanks for such a quick response! I cannot seem to locate my log files? I am running a windows system. Is there a default location in Windows / Can I change the path they are written to ?
If you start influxd in the foreground (i.e. executing influxd from a command prompt), it normally writes logs to standard error.
I don’t have experience running InfluxDB with Windows, so I’m not sure how people are running it as a service or where logs would normally be expected to be sent to. Unfortunately nothing relevant is turning up on any searches I’ve tried. I assume the logs are going to whatever place is standard for how the influxd service is starting.