假定已经有许多应用采用了程序1 - 1 5中所定义的C u r r e n c y类,现在我们想要对C u r r e n c y类
的描述进行修改,使其应用频率最高的两个函数A d d和I n c r e m e n t可以运行得更快,从而提高应
用程序的执行速度。由于用户仅能通过p u b l i c部分所提供的接口与C u r r e n c y类进行交互,
SHOW FULL COLUMNS FROM `jrk_downrecords` [ RunTime:0.001322s ]
SELECT `a`.`aid`,`a`.`title`,`a`.`create_time`,`m`.`username` FROM `jrk_downrecords` `a` INNER JOIN `jrk_member` `m` ON `a`.`uid`=`m`.`id` WHERE `a`.`status` = 1 GROUP BY `a`.`aid` ORDER BY `a`.`create_time` DESC LIMIT 10 [ RunTime:0.106568s ]
SHOW FULL COLUMNS FROM `jrk_tagrecords` [ RunTime:0.004354s ]
SELECT * FROM `jrk_tagrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 20 [ RunTime:0.001279s ]
SHOW FULL COLUMNS FROM `jrk_member` [ RunTime:0.001152s ]
SELECT `id`,`username`,`userhead`,`usertime` FROM `jrk_member` WHERE `status` = 1 ORDER BY `usertime` DESC LIMIT 10 [ RunTime:0.003194s ]
SHOW FULL COLUMNS FROM `jrk_searchrecords` [ RunTime:0.000947s ]
SELECT * FROM `jrk_searchrecords` WHERE `status` = 1 ORDER BY `num` DESC LIMIT 5 [ RunTime:0.004055s ]
SELECT aid,title,count(aid) as c FROM `jrk_downrecords` GROUP BY `aid` ORDER BY `c` DESC LIMIT 10 [ RunTime:0.026162s ]
SHOW FULL COLUMNS FROM `jrk_articles` [ RunTime:0.008048s ]
UPDATE `jrk_articles` SET `hits` = 2 WHERE `id` = 418740 [ RunTime:0.018646s ]