I have this application where I store stock market data and also stored calculated indicator values on that data. I currently use MySQL 5.7 JSON columns to facilitate my storage needs but it is getting quite slow by now with millions and millions of rows. I explored InfluxDB a year of 2 back but went for MySQL back at the time because InfluxDB was still a lot more beta.
Now I have rewritten some code to write my stock market data and calculated indicator values to InfluxDB but can’t seem to find out how to accomplish something I need in my application.
I have measurements called "indicators"
Tags: market (aapl), interval (15minutes for example)
Fields: somewhere between 100-600 different indicator names and their values for example “ssl: 101” which then references a specific indicator configuration in my application.
I can successfully store all the information and am pretty happy with the write speeds. What I know what to do is to get the last 2 measurements of each market with a specific interval BUT also filter on the values like this in pseudo query code: WHERE measurement1.ssl > 100 AND measurement2.ssl < 100
Basically checking if the value of the field ssl changed from below 100 to above 100. This is something I’m currently able to do with MySQL but I have no idea how to do this with Influx. I want to prevent doing this kind of logic in my application because in the real world scenario I have about ~20 field values to check against conditions. Doing this in my application would require loading all data each time so I rather do it with an influxql query.
Forgive me if I’m using the incorrect terms here since I’m new to InfluxDB.