title: SQL Azure - Low performance of External Data Table with nvarchar(max) column
body: <p>I can't find out the reason for a <code>select</code> query against an <code>external data table</code> being so dramatically longer than a direct query against the same table.</p>
  
  <p>The schema of the table is as follows:</p>
  
  <pre><code>CREATE EXTERNAL TABLE [WebApp].[TestTable]
  (
      [TestTableId] [int] NULL,
      -- some other int columns
      [Body] [nvarchar](max) NULL,
  )
  WITH (DATA_SOURCE = [ExternalInterface])
  </code></pre>
  
  <p>The <code>external data source</code> refers to the database located in the same resource group and location.</p>
  
  <p>Direct querying of a total of 70k rows completes in 1second.
  A query against the external table will take up to 20 minutes.</p>
  
  <p>Removing the <code>body</code> column from the select will cut the total time to several seconds. So definitely it has to do with the amount of data transfered.</p>
  
  <p>I guess something goes wrong with my configuration. I just don't believe the elastic query engine can be so slow.</p>