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:[EMAIL PROTECTED] 
Sent: Saturday, December 09, 2006 3:42 PM
To: Nick Meyer
Cc: mysql@lists.mysql.com
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/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to