From: | Patrick(dot)FICHE(at)AQSACOM(dot)COM |
---|---|
To: | cool_screen_name90001(at)yahoo(dot)com, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Getting actual number of rows updated |
Date: | 2005-08-08 08:14:26 |
Message-ID: | 1DC6C8C88D09D51181A40002A5286929B235AB@intranet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
All the raws are updated if there is no WHERE clause.
If you want the UPADATED rows, just specify the WHERE clause and it will
really improve your performance...
EX : UPDATE itemp SET name = replace( name, 'abc', 'def' ) WHERE name LIKE
'%abc%'
----------------------------------------------------------------------------
---------------
Patrick Fiche
email : patrick(dot)fiche(at)aqsacom(dot)com
tél : 01 69 29 36 18
----------------------------------------------------------------------------
---------------
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of CSN
Sent: lundi 8 août 2005 09:33
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Getting actual number of rows updated
Is it possible to have PG report the actual number of
rows that actually CHANGED in an update command? e.g.
UPDATE items set name=replace(name,'abc','def');
UPDATE 9000 -- Actually only 3 were changed
rather than update reporting all rows have been
"updated"?
Thanks,
CSN
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
From | Date | Subject | |
---|---|---|---|
Next Message | Tino Wildenhain | 2005-08-08 08:38:56 | Re: Getting actual number of rows updated |
Previous Message | Oleg Bartunov | 2005-08-08 07:36:28 | Re: tsearch2: very slow queries |