Re: Insert speed question - Mailing list pgsql-general

From Shridhar Daithankar
Subject Re: Insert speed question
Date
Msg-id 200406011305.34969.shridhar@frodo.hserus.net
Whole thread Raw
In response to Insert speed question  (Josué Maldonado <josue@lamundial.hn>)
Responses Re: Insert speed question  (Josué Maldonado <josue@lamundial.hn>)
List 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

pgsql-general by date:

Previous
From: Devrim GUNDUZ
Date:
Subject: Re: FTP daemon that support Postgresql
Next
From: Richard Huxton
Date:
Subject: Re: Mysql to Postgresql