title: dbplyr generating unexpected SQL query
body: <p>I am sending a simple query to a MySQL database using <code>dbplyr</code>:</p>
  <pre><code>library(dbplyr)
  
  my_conn&lt;-dbConnect(...)
  tab&lt;-tbl(my_conn, &quot;myTable&quot;)
  
  tab %&gt;% select(id, date, type) %&gt;%
      filter(type = 'foobar')
  </code></pre>
  <p>However, if I inspect the generated SQL with <code>show_query()</code>, I get this:</p>
  <pre><code>SELECT *
  FROM (SELECT `id`, `date`, `type`
  FROM `myTable`) `q01`
  WHERE (`type` == 'foobar')
  </code></pre>
  <p>This query is very slow to execute.</p>
  <p>If I instead execute the following SQL command on the server:</p>
  <pre><code>SELECT id, date, type FROM db.myTable WHERE type = 'foobar'
  </code></pre>
  <p>then the return is nearly instantaneous.</p>
  <p>My question is: why is <code>dbplyr</code> doing <code>SELECT *</code> (i.e. select all) <em>and then</em> doing a nested select in line 2? Also, why has &quot;q01&quot; appeared in this query? Could this be why my query is very slow to run compared to executing the minimal command directly on the server? I would perhaps expect <code>dbplyr</code> to create inefficient SQL queries as the complexity of the operations increases but--in this case at least--I can't really write a more succinct set of operations. It's just a select and filter (SELECT and WHERE).</p>