Re: update performance
Posted in 2001
Topics: Performance & Tuning, Server Administration
El Lun 12 Feb 2001 19:15, escribiste: > In the year of Our Lord Mon, 12 Feb 2001 18:26:49 -0300, "Martin A. > Marques" > > <martin@math.unl.edu.ar> spake, saying: > >I have to make a query that will update a field of type smallint (a bool > >really), and I have a big amount of values (one per row in the table) > > which are 0 or 1. > >Now, I could make an update of all the column, but maybe only 5% of the > >columns have been changed. > >What should I use to tell informix only to update the colunms which have a > >different value? > > I certainly speak for each of my multiple personalities when I say I don't > understand the question. How do you know a row has changed? Don't worry, my friend Obnoxios, with a par of programing (external) tricks fixed it. But if you want to know: Lets say I pass to a user a list of all the rows of the table (not all the info, but an id, name, and a bool field) and the user sends back an array with the ids (well, kind of, cause it's a bit more complicated) of the rows which should have the bool field activated. The question was: How can this be done in an effective way. Understood? -- System Administration: It's a dirty job, but someone told I had to do it. ----------------------------------------------------------------- Mart'n Marqu's email: martin@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------
In the year of Our Lord Tue, 13 Feb 2001 09:32:10 -0300, "Martin A. Marques" <martin@math.unl.edu.ar> spake, saying: >El Lun 12 Feb 2001 19:15, escribiste: >> In the year of Our Lord Mon, 12 Feb 2001 18:26:49 -0300, "Martin A. >> Marques" >> >> <martin@math.unl.edu.ar> spake, saying: >> >I have to make a query that will update a field of type smallint (a bool >> >really), and I have a big amount of values (one per row in the table) >> > which are 0 or 1. >> >Now, I could make an update of all the column, but maybe only 5% of the >> >columns have been changed. >> >What should I use to tell informix only to update the colunms which have a >> >different value? >> >> I certainly speak for each of my multiple personalities when I say I don't >> understand the question. How do you know a row has changed? > >Don't worry, my friend Obnoxios, with a par of programing (external) tricks >fixed it. > >But if you want to know: >Lets say I pass to a user a list of all the rows of the table (not all the >info, but an id, name, and a bool field) and the user sends back an array >with the ids (well, kind of, cause it's a bit more complicated) of the rows >which should have the bool field activated. >The question was: How can this be done in an effective way. > >Understood? No. As they say in Austin Powers: "Throw me a frickin' bone here someone...?" Language? Table structure?