Skip to content

Benchmark different ways to bulk insert records with Django and PostgreSQL

Notifications You must be signed in to change notification settings

stefano/bulk_insert_experiment

Repository files navigation

To execute these scripts, you need a working PostgreSQL installation.

The following command will drop the database and the user named
'bulk_insert_experiment' (if they exists) and re-create them.

    $ sudo -u postgres psql < create_db.sql

Then you need to install the requirements and create the database schema:

    $ pip install -r requirements.pip
    $ python manage.py migrate

You can now run the benchmark scripts:

    $ python orm_create.py
    ...

    $ python orm_bulk_create.py
    ...

    $ python sql_simple_insert.py
    ...

    $ python sql_simple_insert_executemany.py
    ...

    $ python sql_batch_insert.py
    ...

    $ python copy_from.py
    ...

    $ python generate_data_in_database.py
    ...

About

Benchmark different ways to bulk insert records with Django and PostgreSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages