Re: Sustained inserts per sec ... ?

Поиск
Список
Период
Сортировка
От Christopher Petrilli
Тема Re: Sustained inserts per sec ... ?
Дата
Msg-id 59d991c4050404135650abda4f@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sustained inserts per sec ... ?  (PFC <lists@boutiquenumerique.com>)
Список pgsql-performance
On Apr 4, 2005 4:53 PM, PFC <lists@boutiquenumerique.com> wrote:
> > This is done using COPY syntax, not INSERT syntax. So I suppose "yes"
> > I do.  The file that is being used for COPY is kept on a ramdisk.
>
>         COPY or psql \copy ?
>         If you wanna be sure you commit after each COPY, launch a psql in a shell
> and check if the inserted rows are visible (watching SELECT count(*) grow
> will do)

The script is Python, using pyexpect (a'la expect) and does this, exactly:

psql = pexpect.spawn('/usr/local/pgsql/bin/psql -d bench2 ')
[ ...]
start = time.time()
psql.expect_exact('bench2=#')
psql.sendline("COPY events%03i FROM '/mnt/tmpfs/loadfile';" % (tablenum+1))
results.write('%s\n' % (time.time() - start))
results.flush()

There's other code, but it's all related to building the loadfile.
Note that I'm specifically including the time it takes to get the
prompt back in the timing (but it does slip 1 loop, which isn't
relevent).

Chris
--
| Christopher Petrilli
| petrilli@gmail.com

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

Предыдущее
От: PFC
Дата:
Сообщение: Re: Sustained inserts per sec ... ?
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Sustained inserts per sec ... ?