Re: How to speedup inserts via ADO ?

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: How to speedup inserts via ADO ?
Дата
Msg-id 4B7A17C0.5080309@tpf.co.jp
обсуждение исходный текст
Ответ на How to speedup inserts via ADO ?  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Ответы Re: How to speedup inserts via ADO ?  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Список pgsql-odbc
Arnaud Lesauvage wrote:
> Hi all !
>
> Inserts via ODBC are a lot slower than via native psql connection.
> For instance, I have a very basic insert statement that inserts one row
> in a table.
> If I execute it 1000 times in pgAdmin, it returns in 718ms.
> If I execute it via ADO (with a direct query : Connection.Execute
> "INSERT INTO..."), it takes 15s to complete.
>
> I checked psqlODBC's commlog, but all I see in it are the INSERT
> statements that I issued. So there must be a lot of overhead somewhere,
> but I don't understand where it comes from, and more important I don't
> understand how I could get rid of it.
>
> Are there some connection parameters that I could use to speed things up ?

1. Do inserts in a transction.
2. Set the "Level of rollback on errors" option to Transacion.
3. Use a prepared Command object.

regards,
Hiroshi Inoue


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

Предыдущее
От: Luke Coldiron
Дата:
Сообщение: Re: invalid byte sequence for encoding "UTF8"
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: How to speedup inserts via ADO ?