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

2007-08-14 Thread Gregory Stark
Lim Berger [EMAIL PROTECTED] writes: Here's the table definition: Table public.cachedstats Column | Type | Modifiers ---+---+-- id|

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

2007-08-14 Thread John DeSoi
On Aug 13, 2007, at 11:54 PM, Lim Berger wrote: I am testing through PHP microtime function. The query is administered through pg_query() function of PHP. I know there could be some latency coming in from the PHP's PG functions' overhead, but not such an order of magnitude different from

[GENERAL] Postgresql INSERT speed (how to improve performance)?

2007-08-13 Thread Lim Berger
Hi, I've googled and yahooed and most of the performance tweaks suggested cover SELECT speed, some cover COPY speed with things like turning fsync off and such. But I still have not found how to improve regular INSERT speed on Postgresql. I have a table in MySQL with three compound indexes. I

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

2007-08-13 Thread Tony Caduto
Lim Berger wrote: INSERTing into MySQL takes 0.0001 seconds per insert query. INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query. What can I do to improve this performance? What could be going wrong to elicit such poor insertion performance from Postgresql? Thanks.

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

2007-08-13 Thread Andrej Ricnik-Bay
On 8/14/07, Lim Berger [EMAIL PROTECTED] wrote: INSERTing into MySQL takes 0.0001 seconds per insert query. INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query. What can I do to improve this performance? What could be going wrong to elicit such poor insertion performance

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

2007-08-13 Thread Lim Berger
On 8/14/07, Andrej Ricnik-Bay [EMAIL PROTECTED] wrote: On 8/14/07, Lim Berger [EMAIL PROTECTED] wrote: INSERTing into MySQL takes 0.0001 seconds per insert query. INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query. What can I do to improve this performance? What

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

2007-08-13 Thread Tom Lane
Lim Berger [EMAIL PROTECTED] writes: I have a table in MySQL with three compound indexes. I have only three columns from this table also in PostgreSQL, which serves as a cache of sorts for fast queries, and this table has only ONE main index on the primary key! INSERTing into MySQL takes

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

2007-08-13 Thread Tony Caduto
Lim Berger wrote: On 8/14/07, Andrej Ricnik-Bay [EMAIL PROTECTED] wrote: On 8/14/07, Lim Berger [EMAIL PROTECTED] wrote: INSERTing into MySQL takes 0.0001 seconds per insert query. INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query. What can I do to improve this

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

2007-08-13 Thread Lim Berger
On 8/14/07, Tom Lane [EMAIL PROTECTED] wrote: Lim Berger [EMAIL PROTECTED] writes: I have a table in MySQL with three compound indexes. I have only three columns from this table also in PostgreSQL, which serves as a cache of sorts for fast queries, and this table has only ONE main index on

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

2007-08-13 Thread Lim Berger
On 8/14/07, Lim Berger [EMAIL PROTECTED] wrote: On 8/14/07, Tom Lane [EMAIL PROTECTED] wrote: Lim Berger [EMAIL PROTECTED] writes: I have a table in MySQL with three compound indexes. I have only three columns from this table also in PostgreSQL, which serves as a cache of sorts for

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

2007-08-13 Thread Tom Lane
Lim Berger [EMAIL PROTECTED] 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