'Optimize some SQLite stuff at startup since we
can\'t save it to the database.'

def sqlite3_prep(self):

    if ((('.'.join((str(i) for i in django.VERSION)) < '1.2') and (settings.DATABASE_ENGINE == 'sqlite3')) or (hasattr(settings, 'DATABASES') and (settings.DATABASES.get('default', {}).get('ENGINE', None) == 'django.db.backends.sqlite3'))):
        cursor = connection.cursor()
        cursor.execute('PRAGMA    cache_size=10000')
        cursor.execute('PRAGMA    synchronous=OFF')
        cursor.execute('PRAGMA    count_changes=OFF')
        cursor.execute('PRAGMA    temp_store=2')
