Fast way to check if record exists
You can add an index via `sqlite3 mydb-file` and adding it there. The sqlite docs have plenty of info on creating indexes. To do it via peewee you can:

* Main doc http://docs.peewee-orm.com/en/latest/peewee/models.html#indexes-and-constraints
* add it to the field definition, e.g. `my_field = IntegerField(index=True)`
* add it to the model class' Meta.indexes 
* use [modelindex apis](http://docs.peewee-orm.com/en/latest/peewee/api.html#ModelIndex)
* use `db.execute_sql()` directly to create the index

You can call `ModelClass._schema.create_indexes(safe=True)` after adding the index.

But for what you're trying to do specifically, a bloom filter is probably a better option. If I understand you correctly:

Retrieve all rows from first_table that exist in the second_table, based on a shared value in common_column:
```
select * from first_table
where exists (
    select 1
    from second_table
    where first_table.common_column = second_table.common_column
)
```

In peewee:

    FirstTable.select().where(
        fn.exists(second_table.select().where(
            FirstTable.common_column == SecondTable.common_column
        ))
    )

You can change this to `not exists` to retrieve all rows from first_table that are missing in second_table. In peewee that would be `~fn.exists`
First of all I am sorry in advance for the naive question.

I have an application which needs to iterate over a large number of entries and test each and every one against the sqlite peewee database to see if the value exists in a specific column.

Unfortunately this means tons of queries and this turns out to be slow.

I came across the index option and tried to index the desired column with a migration but I haven't seen any speed differences.

Is any special syntax required to make use of an index? I haven't been able to find an example.