Re: Slow while inserting and retrieval (compared to SQL Server)

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Slow while inserting and retrieval (compared to SQL Server)
Дата
Msg-id 951d8c4c-369d-63b3-f323-83660d96276f@gmx.net
обсуждение исходный текст
Ответ на Re: Slow while inserting and retrieval (compared to SQL Server)  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
Ответы Re: Slow while inserting and retrieval (compared to SQL Server)  ("sivapostgres@yahoo.com" <sivapostgres@yahoo.com>)
Список pgsql-general
sivapostgres@yahoo.com schrieb am 17.02.2021 um 13:01:
> To populate some basic data we try to insert few records (max 4
> records) in few tables (around 6 tables) from one window.  We feel
> that the insert time taken is longer than the time taken while using
> Sql Server.   We tested almost a similar window that updated the
> similar table(s) in SQL server, which was faster.  With Postgres
> database, we need to wait for a couple of seconds before the
> insert/update is over, which we didn't feel in Sql Server.


Are you doing single-row inserts like:

    insert into ... values (..);
    insert into ... values (..);
    insert into ... values (..);
    insert into ... values (..);

or are you doing multi-row inserts like this:

    insert into ... values (..), (..), (..), (..);

Typically the latter will perform much better (especially if autocommit is enabled)




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

Предыдущее
От: luis.roberto@siscobra.com.br
Дата:
Сообщение: Re: Slow while inserting and retrieval (compared to SQL Server)
Следующее
От: "sivapostgres@yahoo.com"
Дата:
Сообщение: Re: Slow while inserting and retrieval (compared to SQL Server)