Given: MySQL 4.0.12, I need to implement a pageview log with a
resolution of 1 day.
I propose this table:
CREATE TABLE `pageviews` (
`id` int(11) NOT NULL auto_increment,
`date` date NOT NULL default '-00-00',
`url` char(120) NOT NULL default '',
`views` mediumint(9) NOT NULL
Given: MySQL 4.0.12, I need to implement a pageview log with a
resolution of 1 day.
..
Would the REPLACE method work?
David
Hmmm...as I read the docs, the LOCK IN SHARED MODE seemed to be the
real key to this.
I created a test script and ran:
$ ab -n100 -c100
Fan, Wellington wrote:
Given: MySQL 4.0.12, I need to implement a pageview log with a
resolution of 1 day.
If you want to brute-force it, I think I would go this route:
create table hits (
day date not null primary key,
hitcount int unsigned not null,
);
insert ignore into hits(day,
Hello Listies,
Given: MySQL 4.0.12, I need to implement a pageview log with a
resolution of 1 day.
I propose this table:
CREATE TABLE `pageviews` (
`id` int(11) NOT NULL auto_increment,
`date` date NOT NULL default '-00-00',
`url` char(120) NOT NULL default '',
`views` mediumint(9)