mysql中的直方图采样逻辑
int handler::sample_next(uchar *buf) { // Temporary set inited to RND, since we are calling rnd_next(). int res = rnd_next(buf); std::uniform_real_distribution<double> rnd(0.0, 1.0); while (!res && rnd(m_random_number_engine) > (m_sampling_percentage / 100.0)) res = rnd_next(buf); return res; }
MySQL限时解答,24小时内友哥专业解答
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指