Re: update with clause first
Posted in 2004
"Jack Parker" wrote
>
> Specific to your question - if state is a valid column, the same
methodology
> should work.
Well i was pretty sure it was possible, bt i don't figure out on how to code
this ....
The rownum need to be replace... but i don't know how to deal with.
Maybe with a "first" clause, but i cannot succeed in having correct code.
>But if you are trying to update a large table in Informix -
> why slow yourself down with Oracle-OLTP methodology? I suggest you read:
>
http://www-106.ibm.com/developerworks/db2/zones/informix/library/techarticle/parker/0502parker.html
>
Wow !
A must read...
(when i look at our performances... :-/ )
But in fact the problem is not only Database answer times based.
But processes too...
If i read to quickly the database (that contains data for query )
Ours processes are going to use 100% machine time for a while....
====
Quick description:
Our processes read a table and each rows contains data that permit to launch
an action (or many actions)
Then it can take for 1s to 5s working time (or more) with accessing or not
to the database.
So if i read 1000 at the same time:
it can take for 15 min to more than an hour to complete the Job.
====
> Although I've only advertised it about 1200 times on this group - OTOH, I
> wrote it so I wouldn't have to walk through it 1200 times.
sorry for that.... and thk you for taking time to post it once again ...and
maybe again and again and again ..... :))
Thk you for your answer, i will try to find how to write this query.
Must be easy , but at this point .... i do not know :)
Thk you once again for the article !
Arnaud
PS: Just a little request ...
Is there a lot of user of ESQLC ??
================================
>
> ----- Original Message -----
> From: "hobbes" <pasdespam@yahoo.fr>
> To: <informix-list@iiug.org>
> Sent: Tuesday, February 10, 2004 6:06 AM
> Subject: update with clause first
>
>
> > Hi !
> >
> > i'm still trying to have a source code that reproduce my core dump
without
> > having our source code in it... but it is long to do. (i will certainly
> > auto_generate it for faster result)
> >
> >
> > But i've got another question :
> >
> > I'm trying to update a whole HUGE table but i've got to do it not too
fast
> > (and not at 1 time).
> > If i make :
> > ===========
> > update table_name set state = :new_state
> > where state = :old_state;> > ===========
> > it's a way too long and can create a lot of lock.
> > And another process need to clear this table ....
> > If the whole things is make at one time => the second process gonna be
> > "crazy" ;) and take all ressources from the computer....
> >
> >
> > So the solution we've found with Oracle :
> > ==============
> > update table_name set state = :new_state
> > where state = :old_state
> > and rownum < 10000;> >
> >
> > is there a way to achieve such a thing with informix ??
> >
> > I cannot modify the code too much since it's included in a whole process
> > code.
> >
> >
> > Thanks for reading :)
> >
> >
> > Arnaud S.
> >
> >
>
>
> sending to informix-list
>
>
> sending to informix-list