Re: More PostgreSQL stuff - Mailing list pgsql-general

From Martin Schulze
Subject Re: More PostgreSQL stuff
Date
Msg-id 19981002131734.A15387@finlandia.infodrom.north.de
Whole thread Raw
In response to Re: More PostgreSQL stuff  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-general
Oliver Elphick wrote:
> Copied to PostgreSQL lists, in the hope of comments from the experts...
>
> Martin Schulze wrote:
>   >Is there a way to speed up postgres?  I'm converting one of my
>   >major apps from mSQL to PostgreSQL and PostgreSQL is at least three
>   >times slower.  That's horrible.  With this slowlyness I cannot
>   >install PostgreSQL in the office but only at home.
>   >
>   >So, is there a way to speed it up?  I have turned off debugging
>   >since I hoped that it was the reason for the slowliness but
>   >apparently it isn't.
>
> It depends what you are doing: every update or insert is a separate
> transaction, unless you declare transactions yourself.  So use
> BEGIN TRANSACTION ... COMMIT ... END TRANSACTION to enclose related
> updates and you should get a speed improvement.
>
> If you are loading a lot of items, COPY is much faster than
> successive INSERTs.
>
> Consider whether to disable fsync; balance the speed improvement against the
> slightly increased risk of corrupting your database in the event of a
> system crash.

I'm making massive use of SELECT statements.  Insert/update is only rare.
Thanks for the hint wrt insert/update.  There is an INDEX on the main
select field already.

Regards,

    Joey

--
A mathematician is a machine for converting coffee into theorems.

pgsql-general by date:

Previous
From: "Oliver Elphick"
Date:
Subject: Re: More PostgreSQL stuff
Next
From: "Jackson, DeJuan"
Date:
Subject: RE: [GENERAL] Re: More PostgreSQL stuff