From: | Shawn <postgres(at)xmtservices(dot)net> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org <pgsql-performance(at)postgresql(dot)org> |
Subject: | Slow Query |
Date: | 2007-09-01 17:29:47 |
Message-ID: | 20070901102947.0c0a50a3@boffin.xmtservices.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hello,
I have a recurring script that updates some tables from an MS_SQL
server. One of the operations sets a field in all records to null in
preparation of being updated with values from the other server. The
SQL statement is:
update shawns_data set alias = null;
Alias is a type varchar(8)
The table has 26 fields per record and there are about 15,700
records. The server hardware is a dual QUAD-CORE Intel 2 GHz XEON dell
2950 server with 4 drive SAS RAID-5 array, and 16G of RAM. The OS is
Slackware 11 with some updatews and Postgres v8.2.4 built from source.
Even after VACUUM this simple line takes 35 sec to complete. Other
more complicated deletes and updates, some of the tables in this
database are over 300 million records, take as much time as this
simple query.
My question: Is there a better, ie. faster, way to do this task?
Shawn
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-09-01 18:09:54 | Re: Slow Query |
Previous Message | Brennan, Sean (IMS) | 2007-09-01 03:08:34 | schemas to limit data access |