List:General Discussion« Previous MessageNext Message »
From:emierzwa Date:December 11 2006 2:27pm
Subject:RE: only update if values different
View as plain text  
I agree, you should just update it since the standard operation for
MYSQL is
to only apply updates if the value is changing.

http://dev.mysql.com/doc/refman/5.0/en/update.html
"If you set a column to the value it currently has,
 MySQL notices this and does not update it."
 
Ed

-----Original Message-----
From: Peter [mailto:peterpub1@stripped] 
Sent: Saturday, December 09, 2006 3:42 PM
To: Nick Meyer
Cc: mysql@stripped
Subject: Re: only update if values different

Hello,
 with good indeces 100 000 rows is basically nothing.

Give it a try.

Peter

Nick Meyer wrote:
> What is the best way to UPDATE a row only if values are different? We
> have a mainframe extract that literally has 100,000 rows and am
worried
> about the performance of just running INSERTs each night.
> 
> Is there a simple comparison command or would you have to nest a
SELECT
> statement? Thank you,
> 
> Nick
> 
> 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1

Thread
only update if values differentNick Meyer9 Dec
  • Re: only update if values differentDotan Cohen9 Dec
  • Re: only update if values differentPeter9 Dec
RE: only update if values differentemierzwa11 Dec