Re: psql vs perl prepared inserts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matt Van Mater <matt(dot)vanmater(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql vs perl prepared inserts
Date: 2005-04-12 22:23:43
Message-ID: 799.1113344623@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matt Van Mater <matt(dot)vanmater(at)gmail(dot)com> writes:
> I've been experimenting with loading a large amount of data into a
> fairly simple database using both psql and perl prepared statements.
> Unfortunately I'm seeing no appreciable differences between the two
> methods, where I was under the impression that prepared statements
> should be much faster (in my case, they are slightly slower).

They should be faster ... if the client library is really using
server-side prepared statements, and not trying to fake it. Up till
7.4 came out there wasn't any very useful way to use server-side
prepared statements in a driver, and I think only the very latest
version of DBD::Pg knows anything about it. See this thread for
some recent discussion:
http://archives.postgresql.org/pgsql-interfaces/2005-04/msg00029.php

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paul Tillotson 2005-04-12 23:05:50 Re: What are the consequences of a bad database design
Previous Message Matt Van Mater 2005-04-12 21:58:04 psql vs perl prepared inserts