title: Azure Stream Analytics is too slow - also time values are irrelavant
body: <p>We want to migrate our dedicated servers to Azure platform for scaling easy and investigated a lot of Azure services for our needs. So one of the Azure service that we want to use is Azure Stream Analytics (ASA).</p>
  
  <p>We've added some Azure Platforms according to our needs for performing some tests (it is not important what they for, for now). Here is the structure:</p>
  
  <p><strong>SimpleApp (Sending Request, Not In Azure) -> Event Hub 1 (EH1) -> ASA -> Event Hub 2 (EH2) -> Function App (FA)</strong></p>
  
  <ul>
  <li><strong>SimpleApp</strong> sends a simple HTTP GET request to classic dedicated server
  which is named <strong>TESTSERVER</strong>. It tooks max 100-150ms and it represents
  our start time. After that it sends the message to EH1.</li>
  <li><strong>ASA's</strong> query is simple like this: SELECT * INTO [Output] FROM [Input]</li>
  <li><strong>Function App</strong> sends a simple HTTP GET request to <strong>TESTSERVER</strong> for
  identifying finish time.</li>
  </ul>
  
  <p>We've shocked when we see the results from our <strong>TESTSERVER</strong> logs. It tooks 4000-5000ms!</p>
  
  <p>Then we started to investigate the issue. Checked values like <strong>EventEnqueuedUtcTime</strong> and <strong>EventProcessedUtcTime</strong> to identify which block causes this slowness. But these time values are totally irrelevant. For example; <strong>EventEnqueuedUtcTime</strong> should be less than <strong>EventProcessedUtcTime</strong> but not! So this shows us time servers may be different even in different Azure blocks and we cannot use them to measure. Am I wrong?</p>
  
  <p>Anyway, after this we suspected that maybe the last <strong>Azure Function App</strong> may cause this slowness. We thought that maybe Function App's Event Hub Trigger does not work well. So we designed a new test environment:</p>
  
  <p><strong>SimpleApp (Sending Request, Not In Azure) -> Event Hub 1 (EH1) -> Function App (FA1) -> Event Hub 2 (EH2) -> Function App 2 (FA2)</strong></p>
  
  <p>Second shock... It tooks only ~400ms totally!</p>
  
  <p>Then, we've performed a lot of tests with different architecture which contains ASA but all of them are too slow for us.</p>
  
  <p>Have you experienced any performance issues with ASA? Could you please share your experience and your flows' total time consumption?</p>
  
  <p>Best regards.</p>