All pastes #88579 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-07-15 04:03 UTC
rendered paste body
CREATE TABLE `date_dim` (
  `dim_id` int(11) NOT NULL auto_increment,
  `year` year(4) NOT NULL default '2006',
  `month` int(2) NOT NULL,
  `week` int(2) NOT NULL,
  `day` int(3) NOT NULL,
  `day_of_week` int(2) NOT NULL,
  `day_of_month` int(2) NOT NULL,
  `hour` int(2) NOT NULL,
  `minute` int(2) NOT NULL,
  PRIMARY KEY  (`dim_id`),
  KEY `month_ix` (`month`),
  KEY `hour_ix` (`hour`),
  KEY `day_of_year_ix` (`day`),
  KEY `minute_ix` (`minute`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2782247 ;

-- --------------------------------------------------------

-- 
-- Table structure for table `user_data`
-- 

CREATE TABLE `user_data` (
  `id` int(11) NOT NULL auto_increment,
  `date_id` int(11) unsigned NOT NULL,
  `users_total` int(11) NOT NULL,
  `users_active` int(11) NOT NULL,
  `users_new_total` int(11) NOT NULL,
  `users_new_active` int(11) NOT NULL,
  `session_total` int(11) NOT NULL,
  `session_unique` int(11) NOT NULL,
  `avg_user_session_min` int(4) unsigned NOT NULL,
  `creation_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3493 ;