vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| On 09/12/06, Nick Meyer <n.meyer@usa.net> 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 > You have to check the line first, then compare and update if neseccary. I've been through that recently, and decided that it was better to just UPDATE. Of course, I had much less rows than you do. Maybe you could store an array of changed rows in whatever language you are programming, then update from that? Or a text file, another DB, whatever... Dotan Cohen http://what-is-what.com/what_is/digg.html http://dramatherapy.info |
| ||||
| 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 > > |