title: PandaSQL very slow
body: <p>I'm currently switching from R to Python (anconda/Spyder Python 3) for data analysis purposes. In R I used to use a lot R sqldf. Since I'm good at sql queries, I didn't want to re-learn data.table syntax. Using R sqldf, I never had performance issues. </p>
  
  <p>Now, in Python I tried using pandasql a simple <code>df = "SELECT * From table LIMIT 1"</code> will last forever on 193k rows, 19 columns. </p>
  
  <p>I tried pysqldf but I get an error saying that the table doesn't exist, but it does exist.</p>
  
  <pre><code># -*- coding: utf-8 -*-
  
  import pandas as pd
  import pandasql 
  import pysqldf
  
  #Data loading    
  orders = pd.read_csv('data/orders.csv',sep = ';')
  
  ###### PANDASQL ######
  test = pandasql.sqldf("SELECT  orders_id from orders LIMIT 1;",globals())
  # Will last several minutes and use a lot of RAM
  
  test = pandasql.sqldf("SELECT  orders_id from orders LIMIT 1;",locals())
  # Will last several minutes and use a lot of RAM
  
  
  ###### PYSQLDF ######
  sqldf = pysqldf.SQLDF(globals())
  test = sqldf.execute("SELECT  * from orders LIMIT 1;")
  #error
  #Error for pysqldf
  
  Traceback (most recent call last):
  
    File "&lt;ipython-input-12-30b645117dc4&gt;", line 1, in &lt;module&gt;
      test = sqldf.execute("SELECT  * from orders LIMIT 1;")
  
    File "C:\Users\p.stepniewski\AppData\Local\Continuum\anaconda3\lib\site-packages\pysqldf\sqldf.py", line 76, in execute
      self._del_table(tables)
  
    File "C:\Users\p.stepniewski\AppData\Local\Continuum\anaconda3\lib\site-packages\pysqldf\sqldf.py", line 117, in _del_table
      self.conn.execute("drop table " + tablename)
  
  OperationalError: no such table: orders
  </code></pre>
  
  <p>Am I missing something? Would prefer a pandasql/pysqldf answer before a "learn panda querying syntax". </p>
  
  <p>Sqldf in R worked on complex queries on tables up to 10millions rows, on an i7/12G ram laptop.</p>
  
  <p>Thanks !</p>