Hi All,

I'm after a little help/advice with indexing...

I have a table for measuring hits on each page within a site:

year month page hits

basically, my php script looks for a row matching this year (2002), this
month (12) and this page (something.php).  if it finds it, increment by 1,
otherwise insert a row.

All is working fine.

However, I'm not sure what column(s) would be best for indexing... this
small PHP script gets called on every hit of every page (with one or two
queries), so I'd like to optimise it in any way I can, finding a balance
between

a) quickly finding out if the row already exists
b) quickly inserting the row if it doesn't

I'm not worried about how long reporting the stats takes.


Or am I worried about nothing?

sql,query



Justin French
--------------------
http://Indent.com.au
Web Development & 
Graphic Design
--------------------


---------------------------------------------------------------------
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