Re: psql is slow and it does not take much resources

From: "Javier de la Torre" <jatorre(at)gmail(dot)com>
To: "Larry Rosenman" <lrosenman(at)pervasive(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psql is slow and it does not take much resources
Date: 2006-05-03 14:11:36
Message-ID: a0174d240605030711y5b3a9fc0j88f0bc823e4f1af6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

It is inserts.

I create the inserts myself with a Python programmed I hace created to
migrate MySQL databases to PostgreSQL (by th way if someone wants
it...)

Thanks.

Javier.

On 5/3/06, Larry Rosenman <lrosenman(at)pervasive(dot)com> wrote:
> Javier de la Torre wrote:
> > Hi all,
> >
> > I've been searching around for an answer to this, but I coulnd't find
> > anything. So here we go.
> >
> > I am running PostgreSQL 8.1.3 on Red Hat on an Intel server with 2GB
> > of RAM and lot of free HD space.
> >
> > I have a very large dump file, more then 4GB, to recreate a database.
> > When I run:
> >
> > psql -Uuser -q -dmydatabase <mydump.sql &
> >
> > It works, but is slow, it inserts about 1.000 record in 10 seconds.
> > But the curious thing is that if I check the resources of the server
> > it seems that psql is not using them much. "top" says that postgres is
> > using around 2% of the processor and psql around 1% so that server is
> > only 3% used. "top" also says that more or less 48% idle and
> > 50%waiting...
> >
> > In the other hand the memory seems to be very high...
> >
> > What could be the problem? Is that the server is just slow reading
> > from the file? It has a 300GB SCSI drive.
> >
> > Is there any way to make this work faster? I would like to recreate
> > the db at least once a month, but this taked too much time...
> >
> > Thanks in advance for any advice.
> >
> > Javier.
> >
> How is the MyDump created? is it inserts? Or copy's?
>
>
>
> --
> Larry Rosenman
> Database Support Engineer
>
> PERVASIVE SOFTWARE. INC.
> 12365B RIATA TRACE PKWY
> 3015
> AUSTIN TX 78727-6531
>
> Tel: 512.231.6173
> Fax: 512.231.6597
> Email: Larry(dot)Rosenman(at)pervasive(dot)com
> Web: www.pervasive.com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Rosenman 2006-05-03 14:12:46 Re: psql is slow and it does not take much resources
Previous Message Vivek Khera 2006-05-03 14:09:32 Re: Replicating PostgreSQL DB to lightweight system