Re: performance for high-volume log insertion - Mailing list pgsql-performance

From Stephen Frost
Subject Re: performance for high-volume log insertion
Date
Msg-id 20090421192531.GC8123@tamriel.snowman.net
Whole thread Raw
In response to Re: performance for high-volume log insertion  (James Mansion <james@mansionfamily.plus.com>)
Responses Re: performance for high-volume log insertion  (david@lang.hm)
Re: performance for high-volume log insertion  (James Mansion <james@mansionfamily.plus.com>)
List pgsql-performance
* James Mansion (james@mansionfamily.plus.com) wrote:
> david@lang.hm wrote:
>> on the other hand, when you have a full queue (lots of stuff to
>> insert) is when you need the performance the most. if it's enough of a
>> win on the database side, it could be worth more effort on the
>> applicaiton side.
> Are you sure preparing a simple insert is really worthwhile?
>
> I'd check if I were you.  It shouldn't take long to plan.

Using prepared queries, at least if you use PQexecPrepared or
PQexecParams, also reduces the work required on the client to build the
whole string, and the parsing overhead on the database side to pull it
apart again.  That's where the performance is going to be improved by
going that route, not so much in eliminating the planning.

    Thanks,

        Stephen

Attachment

pgsql-performance by date:

Previous
From: James Mansion
Date:
Subject: Re: performance for high-volume log insertion
Next
From: Tom Lane
Date:
Subject: Re: WHERE condition not being pushed down to union parts