Re: How to force PostgreSQL to use multiple cores within one connection?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Sergey A(dot)" <n39052(at)gmail(dot)com>
Cc: "Bill Moran" <wmoran(at)collaborativefusion(dot)com>, "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to force PostgreSQL to use multiple cores within one connection?
Date: 2008-10-01 14:12:59
Message-ID: dcc563d10810010712h5407f28h37cfb4239ac21797@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 1, 2008 at 8:04 AM, Sergey A. <n39052(at)gmail(dot)com> wrote:
>> There is a network API for COPY. Look up pg_put_line (or PQputLine
>> or whatever the convention is for whatever API you're using).
>
> Thanks for your answer. I use Erlang (erlang.org) + pgsql2 (it's
> native Erlang driver maintained by ejabberd developers). All all I
> have is the following functions:
>
> connect(User,Password,Database,Options)
> stop(Pid)
> q(Pid,Query)
> q(Pid,Query,Params)
> q(Pid,Query,Params,Options)
> execute_many(Pid,Query,Params) // I use this function to do buffered inserts
> execute(Pid,Query,Params)
> apply_in_tx(Pid,Fun,Args) // it's for transactions
> get_parameters(Pid) // some information about connection

the execute many should probably work. Just load it up with the same
kind of lines you'd see come out of

pg_dump -t tablename

That's the easiest way to see an example.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bill Thoen 2008-10-01 14:32:16 Re: Why Does UPDATE Take So Long?
Previous Message Scott Marlowe 2008-10-01 14:06:52 Re: How to force PostgreSQL to use multiple cores within one connection?