Search Postgresql Archives

Re: feeding big script to psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
To: "Havasvölgyi Ottó" <h.otto@xxxxxxxxxxx>
Cc: <pgsql-general@xxxxxxxxxxxxxx>
Sent: Wednesday, August 03, 2005 1:03 AM
Subject: Re:  feeding big script to psql


=?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= <h.otto@xxxxxxxxxxx> 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





---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux