ARTS week 2
Review
Evaluate good search part I - measure it
https://medium.com/@dtunkelang/evaluating-good-search-part-i-measure-it-5507b2dbf4f6
Chose this article because I'm actively working on improving search experience for our platform.
This article brings general guidelines on what / how to evaluate search quality.
What to measure?
Precision, among the recalled results, relevant results / recalled results
Recall, among all relevant results, recalled results / all relevant results
Indeed these two are very well-acknowledged search metrics by today's industry.
How to measure?
When it comes to the question of How
, the short answer is always (at least 90%) it depends
. We all want perfect solutions but mostly ended up with some feasible solution that is highly adapted to our situation. But this isn't saying there is nothing we could try first.
One good thing to try IMO is :
Measure precision by CTR (click-through-rate), that is, # of clicks / # of views
Do above for only the top ranked items, because only a small amount of users would go through the entire list of search results.
Tip
本周遇到一个mysql slow query问题,研究了一下和index merge有关.
出问题的query:
何为index merge?
https://dev.mysql.com/doc/refman/5.6/en/index-merge-optimization.html
mysql对多个索引进行扫描并把结果合并,以上的Using intersect表示合并用到的是intersect方法,即把index_B_status和PRIMARY这两个index的扫描结果做了交集.
这里什么导致了index merge慢?
Short term fix
使用hint让表B强制使用PRIMARY index :
Long term fix
一般来说出现了intersect index merge,表示index有可以优化的空间,比如建立一个PRIMARY + status的联合索引.
参考
https://www.cnblogs.com/digdeep/p/4975977.html
联合索引中常见的最左前缀问题
另外有一篇关于mysql回表的文章:
cnblogs.com/myseries/p/11265849.html
以后有机会可以好好研究一下
Share
https://xie.infoq.cn/article/0ab0e56794e4f761f38c3a46a
如何做一个合格的team leader.
评论