Slower insert_many performance relative to sqlite3 executemany
Only 2x is really not as bad as I might have thought.

Yes, it's because peewee contains logic for converting python data-types to data-types that can be handled by the database. For example, if you're using `TimestampField` you work with `datetime` objects in Python code, but when it comes to interacting with the DB we convert this to an integer. So when you are inserting objects, peewee is efficient, but it still must make sure to apply all conversions to the application data before sending it to the db. Same applies when reading from a cursor.

The code in peewee is optimized and uses efficient algorithms, but its doing a lot for you to make life easier and there's a performance cost.

At the end of the day remember that it's python. It's slow compared to C. You want to go fast? Use C. Thanks for the reply. For anyone else who stumbles on this. I was able to get similar performance as sqlite's executemany using using peewee's execute_sql like this. Not ideal, but is worth it for me because of large inserts i need to do and since this table has pretty simple data types. 

I like to use peewee for the other nice features like datetime you mentioned.

``` python
insert_query = ''' INSERT OR IGNORE INTO foo_table (seq, params_in, results_out) VALUES (?, ?, ?) '''
with db.atomic():
    for row in to_insert:
        db.execute_sql(insert_query, row)
```

 For select queries, when you are iterating over lots of rows, here are some docs that may be helpful:

http://docs.peewee-orm.com/en/latest/peewee/querying.html#iterating-over-large-result-sets There's also [sweepea](https://github.com/coleifer/sweepea), a sqlite query-builder I wrote using Cython that may be faster.
Thank you for developing peewee, it is a great lightweight ORM !

I am inserting batches in peewee like this : 
```python
import peewee

db = peewee.SqliteDatabase('test_db.sqlite3',pragmas={'synchronous': 0,' 'journal_mode':'wal'})

with db.atomic(): # 10000 rows in this transaction
    for batch in peewee.chunked(to_insert,249):
        FooTable.insert_many(batch, fields=[Bar.seq, Bar.params_in, Bar.results_out]).on_conflict_ignore(True).execute()
```
I am able to insert twice as fast using sqlite3's executemany function. I am using the same PRAGMA options in both. The table has primary key on a string column seq.
 
``` python
import sqlite3

insert_query = ''' INSERT OR IGNORE INTO foo_table (seq, params_in, results_out) VALUES (?, ?, ?) '''
conn = sqlite3.connect('test_db.sqlite3')
conn.execute('PRAGMA synchronous = OFF')
conn.execute('PRAGMA journal_mode = wal')
conn.commit()

conn.executemany(insert_query, to_insert) # 10000 rows
conn.commit()
```

While the inserts are reasonably fast using peewee (~ 30000 inserts a sec) , I wanted to know why it is ~ 2x slower than using sqlite3, or is this much slowdown expected because of the abstraction layer provided by the ORM ?
