Re: Postgresql INSERT speed (how to improve performance)?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Lim Berger" <straightfwd007(at)gmail(dot)com>
Cc: "Postgresql General List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql INSERT speed (how to improve performance)?
Date: 2007-08-14 04:13:27
Message-ID: 10256.1187064807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Lim Berger" <straightfwd007(at)gmail(dot)com> writes:
>> Thanks Tom. But on a newly minted table, sure, the performance would
>> be great. My table now has about 3 million rows (both in MySQL and
>> PG).

Well, INSERT speed is really not very dependent on table size (else I'd
have inserted a few zillion rows before timing it). Personally I rather
like Tony's theory that you've gotten confused about what the timing
units are.

> Btw, the query is as simple as:

> INSERT INTO cachedstats
> (id, prof_name, notes, inform_prof_on_change)
> VALUES
> (3190087, 'Lim Berger', '.....text of about 1000 chars', 'Y');

These are the sorts of details that you can't leave out if you want
an intelligent response.

> I am testing through PHP microtime function.

Well, that brings up a whole host of questions, starting with whether
the PHP DB adapter you're using is any good. Can you replicate similar
timings if you feed the same query into plain psql?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message john_sm 2007-08-14 07:25:37 Enterprise Wide Deployment
Previous Message Lim Berger 2007-08-14 03:54:31 Re: Postgresql INSERT speed (how to improve performance)?