Re: Turning off transactions completely.

Поиск
Список
Период
Сортировка
От Maarten.Boekhold@reuters.com
Тема Re: Turning off transactions completely.
Дата
Msg-id T58517e5a82c407b706534@reuters.com
обсуждение исходный текст
Ответ на Turning off transactions completely.  ("Arsalan Zaidi" <azaidi@directi.com>)
Список 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 по дате отправления:

Предыдущее
От: "Arsalan Zaidi"
Дата:
Сообщение: Re: Turning off transactions completely.
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Turning off transactions completely.