title: InfluxDB performance
body: <p>For my case, I need to capture 15 performance metrics for devices and save it to InfluxDB. Each device has a unique device id.</p>
  
  <p>Metrics are written into InfluxDB in the following way. Here I only show one as an example</p>
  
  <pre><code>new Serie.Builder("perfmetric1")
      .columns("time", "value", "id", "type")
      .values(getTime(), getPerf1(), getId(), getType())
      .build()
  </code></pre>
  
  <p>Writing data is fast and easy. But I saw bad performance when I run query. I'm trying to get all 15 metric values for the last one hour.</p>
  
  <pre><code>select value from perfmetric1, perfmetric2, ..., permetric15
  where id='testdeviceid' and time &gt; now() - 1h
  </code></pre>
  
  <p>For an hour, each metric has 120 data points, in total it's 1800 data points. The query takes about 5 seconds on a c4.4xlarge EC2 instance when it's idle.</p>
  
  <p>I believe InfluxDB can do better. Is this a problem of my schema design, or is it something else? Would splitting the query into 15 parallel calls go faster?</p>