Re: insert vs select into performance

От: Michael Stone
Тема: Re: insert vs select into performance
Дата: ,
Msg-id: 20070717205832.GB12481@mathom.us
(см: обсуждение, исходный текст)
Ответ на: Re: insert vs select into performance  (Thomas Finneid)
Список: pgsql-performance

Скрыть дерево обсуждения

insert vs select into performance  (Thomas Finneid, )
 Re: insert vs select into performance  (Michael Glaesemann, )
  Re: insert vs select into performance  (Tom Lane, )
   Re: insert vs select into performance  (Thomas Finneid, )
    Re: insert vs select into performance  (Michael Stone, )
     Re: insert vs select into performance  (Adriaan van Os, )
      Re: insert vs select into performance  (Heikki Linnakangas, )
  Re: insert vs select into performance  (Thomas Finneid, )
   Re: insert vs select into performance  (Michael Stone, )
   Re: insert vs select into performance  (Mark Lewis, )
    Re: insert vs select into performance  (Thomas Finneid, )
   Re: insert vs select into performance  (Michael Glaesemann, )
    Re: insert vs select into performance  (Thomas Finneid, )
 Re: insert vs select into performance  (Arjen van der Meijden, )
  Re: insert vs select into performance  (Thomas Finneid, )
   Re: insert vs select into performance  (Michael Stone, )
    Re: insert vs select into performance  (Thomas Finneid, )
     Re: insert vs select into performance  (Michael Stone, )
 Re: insert vs select into performance  (PFC, )
  Re: insert vs select into performance  (Thomas Finneid, )
   Re: insert vs select into performance  (PFC, )
    Re: insert vs select into performance  (Thomas Finneid, )

On Tue, Jul 17, 2007 at 10:50:22PM +0200, Thomas Finneid wrote:
>I havent done this test in a stored function yet, nor have I tried it
>with a C client so far, so there is the chance that it is java/jdbc that
>makes the insert so slow. I'll get to that test soon if there is any
>chance my theory makes sence.

What you're seeing is perfectly normal. Switch to COPY for fast inserts.
(When you use inserts you need to wait for a round-trip for each row,
instead of sending data to the server as fast as possible.)

Mike Stone


В списке pgsql-performance по дате сообщения:

От: Ron Mayer
Дата:
Сообщение: ionice to make vacuum friendier?
От: Adriaan van Os
Дата:
Сообщение: Re: TRUNCATE TABLE