Re: Sustained inserts per sec ... ?

От: Tom Lane
Тема: Re: Sustained inserts per sec ... ?
Дата: ,
Msg-id: 28575.1112389417@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Sustained inserts per sec ... ?  (Mike Nolan)
Ответы: Re: Sustained inserts per sec ... ?  (Mike Nolan)
Список: pgsql-performance

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

Sustained inserts per sec ... ?  ("Marc G. Fournier", )
 Re: Sustained inserts per sec ... ?  (Mike Nolan, )
  Re: Sustained inserts per sec ... ?  (Tom Lane, )
   Re: Sustained inserts per sec ... ?  (Mike Nolan, )
 Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
  Re: Sustained inserts per sec ... ?  (Tom Lane, )
   Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
    Re: Sustained inserts per sec ... ?  ("Joshua D. Drake", )
     Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
      Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
       Re: Sustained inserts per sec ... ?  (Tom Lane, )
        Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
         Re: Sustained inserts per sec ... ?  (Tom Lane, )
          Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
       Re: Sustained inserts per sec ... ?  (Simon Riggs, )
        Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
         Re: Sustained inserts per sec ... ?  (Simon Riggs, )
          Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
           Re: Sustained inserts per sec ... ?  (PFC, )
            Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
           Re: Sustained inserts per sec ... ?  (Simon Riggs, )
            Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
             Re: Sustained inserts per sec ... ?  (Simon Riggs, )
              Re: Sustained inserts per sec ... ?  (Mike Rylander, )
              Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
    Re: Sustained inserts per sec ... ?  (Tom Lane, )
 Re: Sustained inserts per sec ... ?  (Alex Turner, )
  Re: Sustained inserts per sec ... ?  (Alex Turner, )
   Re: Sustained inserts per sec ... ?  (Tom Lane, )
    Re: Sustained inserts per sec ... ?  (Alex Turner, )
 Re: Sustained inserts per sec ... ?  (Tom Lane, )
  Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
   Re: Sustained inserts per sec ... ?  (Tom Lane, )
  Re: Sustained inserts per sec ... ?  (Greg Stark, )
   Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
   Re: Sustained inserts per sec ... ?  (Tom Lane, )
    Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
     Re: Sustained inserts per sec ... ?  ("Jim C. Nasby", )
     Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
  Re: Sustained inserts per sec ... ?  (Simon Riggs, )
   Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
    Re: Sustained inserts per sec ... ?  (Simon Riggs, )
   Re: Sustained inserts per sec ... ?  (Christopher Petrilli, )
    Re: Sustained inserts per sec ... ?  (Simon Riggs, )

Mike Nolan <> writes:
> Well, I just did an insert of 27,500 records with 9 fields, averaging
> around 118 bytes per record, each insert statement coming from a separate
> SQL statement fed to psql, and it took a bit over 4 minutes, or about
> 106 inserts per second.

Is that with a separate transaction for each insert command?  I can get
significantly higher rates on my devel machine if the inserts are
bundled into transactions of reasonable length.

With fsync on, you can't expect to get more than about one commit per
disk rotation (with a single inserting process), so with say a 7200RPM
drive (120 revs/sec) the above is a pretty good fraction of the
theoretical limit.

            regards, tom lane


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

От: Michael Fuhr
Дата:
Сообщение: Re: date - range
От: Mischa
Дата:
Сообщение: Re: date - range