CPU spike when doing PARSE (what is this?)

From: Ow Mun Heng <Ow(dot)Mun(dot)Heng(at)wdc(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: CPU spike when doing PARSE (what is this?)
Date: 2007-09-18 06:11:16
Message-ID: 1190095876.15849.20.camel@neuromancer.home.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just a short background.

using Perl-DBI to pull data from mssql into PG and \copy into a temp
table where the following is done.

my $query1 = "DELETE FROM $table_name
WHERE $unique_id in
(SELECT $unique_id from $table_name_loading)";
my $query2 = "INSERT INTO $table_name SELECT * FROM $table_name_loading";
my $query3 = "UPDATE sync_log SET last_sync=?,
record_update_date_time=current_timestamp
WHERE table_name=?
AND db_name = ?";
my $query4 = "TRUNCATE TABLE $table_name_loading";

I constantly see an operation in htop (an alternative to top)

postgres:username databasename 127.0.0.1(37833) PARSE

which sucks up huge blobs of my CPU time and I would like to know what it is exactly.
I would not be surprised if it's the DELETE which is the bottleneck, as it's DELETING
from a huge table > 6 million in size from the loading_temp_table.

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moseley 2007-09-18 06:14:01 pgcrypto: is an IV needed with pgp_sym_encrypt()?
Previous Message Joshua D. Drake 2007-09-18 05:59:12 Re: For index bloat: VACUUM ANALYZE vs REINDEX/CLUSTER