Re: feeding big script to psql
От | Havasvölgyi Ottó |
---|---|
Тема | Re: feeding big script to psql |
Дата | |
Msg-id | 00ab01c59875$f42bbd70$8200a8c0@OTTO обсуждение исходный текст |
Ответ на | Tool for database design documentation? ("Jon Christian Ottersen" <jco@kvikkpass.no>) |
Ответы |
Re: feeding big script to psql
|
Список | pgsql-general |
Tom, My queries were written in multi-line mode like this: insert into t1 values(1, 2, 3); I don't know, what effect this has to performace.. Regards, Otto ----- Original Message ----- From: "Tom Lane" <tgl@sss.pgh.pa.us> To: "Havasvölgyi Ottó" <h.otto@freemail.hu> Cc: <pgsql-general@postgresql.org> Sent: Wednesday, August 03, 2005 1:03 AM Subject: Re: [GENERAL] feeding big script to psql > =?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= <h.otto@freemail.hu> writes: >> Thanks for the suggestion. I have just applied both switch , -f (I have >> applied this in the previous case too) and -n, but it becomes slow again. >> At >> the beginning it reads about 300 KB a second, and when it has read 1.5 >> MB, >> it reads only about 10 KB a second, it slows down gradually. Maybe others >> should also try this scenario. Can I help anything? > > Well, I don't see it happening here. I made up a script consisting of a > whole lot of repetitions of > > insert into t1 values(1,2,3); > > with one of these inserted every 1000 lines: > > \echo 1000 `date` > > so I could track the performance. I created a table by hand: > > create table t1(f1 int, f2 int, f3 int); > > and then started the script with > > psql -q -f big.sql testdb > > At the beginning I was seeing about two echoes per second. I let it run > for an hour, and I was still seeing about two echoes per second. That's > something close to 170MB of script file read (over 5.7 million rows > inserted by the time I stopped it). > > So, either this test case is too simple to expose your problem, or > there's something platform-specific going on. I don't have a windows > machine to try it on ... > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > >
В списке pgsql-general по дате отправления: