From: | Maarten(dot)Boekhold(at)reuters(dot)com |
---|---|
To: | Arsalan Zaidi <azaidi(at)directi(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Turning off transactions completely. |
Date: | 2002-01-08 07:52:17 |
Message-ID: | T58517e5a82c407b706534@reuters.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)boekhold(at)reuters(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2002-01-08 08:14:43 | Re: Turning off transactions completely. |
Previous Message | Arsalan Zaidi | 2002-01-08 07:47:09 | Re: Turning off transactions completely. |