Skip to content

Accelerate SQlite access. #16

@jedie

Description

@jedie

The SQLite access is the limited factor if many small files must be backuped.

Here's a collection of ideas to accelerate the DB access...

Current PRAGMA statements are:

            "PRAGMA journal_mode = MEMORY;",
            "PRAGMA temp_store = MEMORY;",
            "PRAGMA synchronous = OFF;"

see:

def setup_sqlite(sender, connection, **kwargs):

bedup makes this:

    # Uncripple the SQL implementation
    cur.execute('PRAGMA foreign_keys = ON')

    # So that writers do not block readers
    # https://www.sqlite.org/wal.html
    cur.execute('PRAGMA journal_mode = WAL')

see: https://github.com/g2p/bedup/blob/7283da47c3a2ffc01336389dae84f510caa034d9/bedup/__main__.py#L78

Maybe journal_mode = WAL will be faster then journal_mode = MEMORY ?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions