why update is slower on my pc?

From: sunpeng <bluevaley(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: why update is slower on my pc?
Date: 2010-12-26 12:35:25
Message-ID: AANLkTimWE18LmL859k1BKN8QKck5HsHJP+foAGashH91@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I use my laptop to execute the following sql, it's:
mydb=# update _mcir_2597431_clusterid2 set clusterid = 3;
UPDATE 104770
Time: 8666.447 ms

and on my pc:
mydb=# update _mcir_2597431_clusterid2 set clusterid = 3;
UPDATE 104770
Time: 27171.203 ms

First I wondered whether the write speed on pc is lower than laptop, so i
use a cp command to test a write speed:
on my laptop:
postgres(at)postgres-laptop:~$ time cp backup/soft/data\ mining/SPSS\
Clementine\ v11.rar develop/

real 0m19.403s
user 0m0.032s
sys 0m3.472s

on my pc:
postgres(at)postgres-laptop:~$ time cp backup/soft/data\ mining/SPSS\
Clementine\ v11.rar develop/

real 0m9.192s
user 0m0.008s
sys 0m1.708s

so the writing speed on disk of pc is much faster than laptop, why the
update sql command is much slower than my laptop? what's the reason causing
such decrease?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Elliot Chance 2010-12-26 13:07:24 SQL queries inside a C function?
Previous Message zeljko 2010-12-26 11:27:53 Re: Compress data sent to client