Hi all,

I'm encountering some problems with code on a PHP/MySQL driven site.  It's a
long story to document, but the end result is that I have to look at my
entire code library looking for problems :)


One area that I'm seeking further knowledge about is how MySQL behaves under
load.  I have a small PHP script which is executed on EVERY page request.
It's a counter script which:

- looks for the relevant page id in a table 'pages'
  - if not there, creates it
- adds a record to a table 'hits' with a timestamp and page id


This all seems really basic to me, but it occurred to me that under load,
this script might fail...

I've never looked into locking (do I need to consider that with MySQL?)

I've never thought about "what happens when two scripts hit the database
table at the same time", etc etc.


Any links or tips would be great,

Thanks
Justin

sql,query



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to