Re: Postgresql INSERT speed (how to improve performance)?

Поиск
Список
Период
Сортировка
От Tony Caduto
Тема Re: Postgresql INSERT speed (how to improve performance)?
Дата
Msg-id 46C11ADD.9020104@amsoftwaredesign.com
обсуждение исходный текст
Ответ на Postgresql INSERT speed (how to improve performance)?  ("Lim Berger" <straightfwd007@gmail.com>)
Список pgsql-general
Lim Berger wrote:
>
> INSERTing into MySQL takes 0.0001 seconds per insert query.
> INSERTing into PgSQL takes 0.871 seconds per (much smaller) insert query.
>
> What can I do to improve this performance? What could be going wrong
> to elicit such poor insertion performance from Postgresql?
>
> Thanks.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>


The first thing I would ask is what type of DB engine are you using
while doing the inserts on MySQL?
The reason MySQL is doing the inserts faster is it does not have
transaction support if you are using anything other than InnoDB.

With that said you can increase your insert performance by simply using
a transaction and committing every 1000 rows or so.

If you do this you will see a huge performance increase.

hope that helps.

Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of Lightning Admin for PostgreSQL and MySQL



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

Предыдущее
От: Ow Mun Heng
Дата:
Сообщение: Copy command and duplicate items (Support Replace?)
Следующее
От: "Andrej Ricnik-Bay"
Дата:
Сообщение: Re: Postgresql INSERT speed (how to improve performance)?