Re: Postgresql INSERT speed (how to improve performance)? - Mailing list pgsql-general

From Tom Lane
Subject Re: Postgresql INSERT speed (how to improve performance)?
Date
Msg-id 10256.1187064807@sss.pgh.pa.us
Whole thread Raw
In response to Re: Postgresql INSERT speed (how to improve performance)?  ("Lim Berger" <straightfwd007@gmail.com>)
List pgsql-general
"Lim Berger" <straightfwd007@gmail.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

pgsql-general by date:

Previous
From: "Lim Berger"
Date:
Subject: Re: Postgresql INSERT speed (how to improve performance)?
Next
From: Gregory Stark
Date:
Subject: Re: Postgresql INSERT speed (how to improve performance)?