Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: is it possible in pl/sql?
Not sure about count(1) being more efficient. I, personally, have never
seen any evidence for that!
Steve
david wendelken wrote:
>Gosh, the original programmer was somewhat confused about what they are doing and/or coding in general and/or coding in pl/sql.
>
>[snip]
>
> -- count(*) is wasteful. count(1) is more efficient.
> sqlstmt := 'UPDATE myTables SET new_Rows = (select count(*)
>from ' || x.Table_Name|| ') WHERE Table_Name = ' || x.Table_Name||';
> -- execute dynamic sql
> END;
>END LOOP;
>end;
>/
>
>
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Feb 10 2005 - 04:40:32 CST