[ic] efficiency experts! 20,000 iterations, please give me direction ->^<-

Dan Browning interchange-users@icdevgroup.org
Fri Jan 24 02:59:00 2003


At 09:51 PM 1/23/2003 -0800, you wrote:
>What are my options? There is [loop-sub routine], but still this is way too
>much even for that. I was thinking of possibly having an additional column
>called "greeting" then use the above like a tool somehow and have it run
>through a database and copy the result into that rows "greeting" column.
>Then every time someone(we) edits, or adds, it can run it through the above,
>and into the greeting column. So, it would require me to run the above ONCE
>on the entire table of 20,000, then (on)EACH time a userdb record is edited,
>or added (which individually is not too big a deal).

Yes -- having a salutation field is the way to go IMHO.  If your db 
supports it, write a function that updates the salutation on every 
update/commit to related records.  Since we use PostgreSQL, we do this a 
lot using PL/pgSQL and it works like a charm.

--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies,      <dan.browning@kavod.com> |
| 6700 NE 162nd Ave, Suite 210, Vancouver, WA (360) 843-4074 x217 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
In Corning, Iowa, it's a misdemeanor for a man to ask his wife to ride
in any motor vehicle.