Re: Insert speed question

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: Josué Maldonado <josue(at)lamundial(dot)hn>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Insert speed question
Date: 2004-06-01 07:35:34
Message-ID: 200406011305.34969.shridhar@frodo.hserus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 01 June 2004 01:35, Josué Maldonado wrote:
> Hello List,
>
> I'm importing some data from Foxpro to Postgres, there is atable wich
> contains aprox 4.8 million rows and it size about 830MB. I uploaded it
> to Postgres using dbf2pg and worked fine, it tooks about 10-15 minutes.
> Now I'm inserting some data from that table to a brand new table in
> Postgresql, for that I'm doing insert into ... select from. The point is
> inserting this data from one table to another table in Postgresql took
> about 35 minutes ago. Is that the expected behavior in Postgres?

Can you generate explain analyze for insert into.. select from? Most probably
it is using seq. scan because you haven't analysed after inserting 4.8M rows.

Do a vacuum verbose analyze tablename and reattempt inter into.. select from.

You can also read general tuning guide at

http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php

HTH

Shridhar

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-06-01 08:22:25 Re: Mysql to Postgresql
Previous Message Devrim GUNDUZ 2004-06-01 07:10:22 Re: FTP daemon that support Postgresql