Parallel insert to postgresql with thread

Jean-Paul Calderone exarkun at
Thu Oct 25 13:31:45 CEST 2007

On Thu, 25 Oct 2007 04:00:44 -0700, Abandoned <besturk at> wrote:
>I use the threading module for the fast operation.

For fast operation, avoid the threading module.  Here's a code sample:

    conn = connect(...)
    cursor = conn.cursor()
    cursor.executemany("INSERT INTO keywords (keyword) VALUES (%s)", datas)

Note that I also corrected your use of %, which was unnecessarily complex and


More information about the Python-list mailing list