Quote:
Originally Posted by pRED*
Why not just use clientprefs? It abstracts all the database complexities (including threading), and provides caching as well.
|
I did try clientprefs awhile back, Foreach pref there was a new row. Again we would have around 57,000 rows.
Then I changed to use KV's, but that seems to be slowing.
sm_cookie uses 1 row per setting.
The idea was to minimize this to 1 db and 1 row per user.
Code:
CREATE TABLE `sm_preferences` (
`auth_id` varchar(64) NOT NULL,
`a_pref` int(11) DEFAULT '0',
`b_pref` int(11) DEFAULT '0',
`c_pref` int(11) DEFAULT '0',
`d_pref` int(11) DEFAULT '0',
`e_pref` int(11) DEFAULT '0',
`f_pref` int(11) DEFAULT '0',
`g_pref` int(11) DEFAULT '0',
`h_pref` int(11) DEFAULT '0',
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`auth_id`),
UNIQUE KEY `auth_id` (`auth_id`)
)
__________________