[wp-hackers] Re: DB Queries--which way to go?
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,
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.
Express yourself instantly with MSN Messenger! Download today - it's FREE!
More information about the wp-hackers