Sqlite3 Python Search Algorithms