Re: Turning off transactions completely. - Mailing list pgsql-general

From Maarten.Boekhold@reuters.com
Subject Re: Turning off transactions completely.
Date
Msg-id T58517e5a82c407b706534@reuters.com
Whole thread Raw
In response to Turning off transactions completely.  ("Arsalan Zaidi" <azaidi@directi.com>)
List pgsql-general

On 01/08/2002 10:02:39 AM Arsalan Zaidi wrote:
>
> >   - look on your indexes, perhaps you can create an index on two columns?
>
> Got them up the wazoo. Two column ones as well...

You know that too many indices hurts insert/update/delete performance, right? For each of these actions, all related indices would need to be updated. So if you have any indices that are not used or you could do without, remove them.
 
> Just want to know, is an index on (foo,bar) different from (bar,foo)? Does
> the order in which they appear in the index creation statement and in
> subsequent queries make a difference?

Yes, the order does make a difference. For one, if you have an index on (foo,bar) and you have a where-clause that only restricts on bar (but not foo), this index won't be used.

> Ah, interesting point. I spent the last two (working) days converting my
> single process app into a multi threaded one, to allow me to fire off
> multiple queries at the same time. I was hoping this would lead to a more
> optimum use of system resources... Didn't work. Best case, the
> multi-threaded app is just as fast as the single -threaded one and in the
> worst case; it's much slower.

Are you using the same database connection for each thread in your multi-threaded approach? Postgresql will only benefit from multiple processors if there are multiple postgres processes running. In application speach that means that you need to have multiple database connections open (i.e. one backend process per connection).

Maarten

----

Maarten Boekhold, maarten.boekhold@reuters.com

Reuters Consulting / TIBCO Finance Technology Inc.
Dubai Media City
Building 1, 5th Floor
PO Box 1426
Dubai, United Arab Emirates
tel:+971(0)4 3918300 ext 249
fax:+971(0)4 3918333
mob:+971(0)505526539


-------------------------------------------------------------- --
Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.

pgsql-general by date:

Previous
From: "Arsalan Zaidi"
Date:
Subject: Re: Turning off transactions completely.
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Turning off transactions completely.