[wp-hackers] Re: DB Queries--which way to go?
Andy Skelton
skeltoac at hotmail.com
Sun Jul 10 22:10:11 GMT 2005
>From: Elliott Bäck <ecb29 at cornell.edu>
>Well, it's two queries versus a single query and then an amortized "long
>batch run" later. On a high-traffic site, having two additional (but
>small) queries run for every user might noticeably increase latency. Then
>again, it might not!
>
>It seems less likely to cause potentially errors this first (1) way,
>though...
I have had success with doing a blind UPDATE, checking for success with
either the function's return value or mysql_affected_rows() and then doing
an INSERT on failure.
Cheers,
Andy
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the wp-hackers
mailing list