problem description:
i have a web site and i want to print out elements on page request. Any time i print an element i like to update the record of his impression count. For statistic purpose.
The implementation:
a mySQL table (id INT primaryKey, name VARCHaR, count INT)
when i print with PHP the element i call a MYsql query like this
insert into myTBL (id, count) VALUES (x , y) ON DUPLICATE KEY y=y+1
MY host provider says
the above query looks like to affect webserver performance.
Well i execute this query about ten times before loading page , but this was supposed to be a real simple query...i go for update a specific id. So How come? It has it's own index (id) .... do you know a better way to perform this?
Thanks