Re: More PostgreSQL stuff

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: More PostgreSQL stuff
Дата
Msg-id 199810020720.IAA07924@linda.lfix.co.uk
обсуждение исходный текст
Ответы Re: More PostgreSQL stuff  (Martin Schulze <joey@finlandia.Infodrom.North.DE>)
Re: [GENERAL] Re: More PostgreSQL stuff  ("Marc G. Fournier" <scrappy@hub.org>)
Список pgsql-general
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.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "Set your affection on things above, not on things on
      the earth."          Colossians 3:2



В списке pgsql-general по дате отправления:

Предыдущее
От: "Taral"
Дата:
Сообщение: RE: [GENERAL] Long update query ? (also Re: [GENERAL] CNF vs. DNF)
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Re: More PostgreSQL stuff