{"id":432678,"date":"2021-04-18T15:27:23","date_gmt":"2021-04-18T07:27:23","guid":{"rendered":"http:\/\/4563.org\/?p=432678"},"modified":"2021-04-18T15:27:23","modified_gmt":"2021-04-18T07:27:23","slug":"%e5%83%8f-pixiv-%e9%82%a3%e7%a7%8d%e6%a0%b9%e6%8d%ae%e6%a0%87%e7%ad%be%e6%90%9c%e7%b4%a2%e5%9b%be%e7%89%87%e7%9a%84%e5%8a%9f%e8%83%bd%ef%bc%8c%e5%90%8e%e7%ab%af%e6%98%af%e6%80%8e%e4%b9%88%e5%81%9a","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=432678","title":{"rendered":"\u50cf pixiv \u90a3\u79cd\u6839\u636e\u6807\u7b7e\u641c\u7d22\u56fe\u7247\u7684\u529f\u80fd\uff0c\u540e\u7aef\u662f\u600e\u4e48\u505a\u5f97\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u50cf pixiv \u90a3\u79cd\u6839\u636e\u6807\u7b7e\u641c\u7d22\u56fe\u7247\u7684\u529f\u80fd\uff0c\u540e\u7aef\u662f\u600e\u4e48\u505a\u5f97\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Nillouise <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u4e00\u5f20\u56fe\u6709\u591a\u4e2a\u6807\u7b7e\uff0c\u4e00\u4e2a\u6807\u7b7e\u53ef\u4ee5\u641c\u7d22\u51fa\u591a\u5f20\u56fe\uff0c\u540c\u65f6\u641c\u7d22\u8fd8\u80fd\u8fd4\u56de\u603b\u7684\u6570\u91cf\uff08\u8fd9\u6837\u624d\u53ef\u4ee5\u8fdb\u884c\u5206\u9875\u5427\uff1f\uff09\uff0c\u6807\u7b7e\u4e4b\u95f4\u53ef\u4ee5\u7ec4\u5408\u641c\u7d22\uff0cmysql \u5e94\u8be5\u505a\u4e0d\u4e86\u8fd9\u79cd\u9700\u6c42\uff0c\u90a3\u5c31\u662f\u7528 elastic \u505a\u7684\uff1f\u4f46 elastic \u652f\u6301\u8fd9\u79cd\u5206\u9875\u529f\u80fd\uff1f\u800c\u4e14\u6211\u5370\u8c61\u4e2d elastic \u641c\u7d22\u4e0d\u5feb\uff08\u7528 kibana \u641c\u540e\u7aef log \u51e0\u79d2\u5ef6\u8fdf\uff09\uff0c\u80fd\u505a\u6210\u8fd9\u4e48\u9ad8\u6027\u80fd\uff1f<\/p>\n<p>\u6709\u70b9\u597d\u5947\u8fd9\u79cd\u5e38\u7528\u529f\u80fd\u662f\u600e\u4e48\u5b9e\u73b0\u7684\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5650872\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leoleoasd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5047\u8bbe\u6709\u4e2a image \u8868\uff0c\u548c image has tag \u8868\uff0c\u90a3 mysql \u67e5\u8be2\u6709 3 \u4e2a\u6307\u5b9a tag \u7684\u8bed\u53e5\u5c31\u662f<br \/>select * from images where id in (select image_id from image_has_tag where tag_name = &#8216;1&#8217; or tag_name = &#8216;2&#8217; or tag_name = &#8216;3&#8217; grouping by image_id having count(*) = 3)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650873\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leoleoasd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u4e00\u5b9a\u5b8c\u5168\u5bf9\uff0c\u5927\u6982\u8fd9\u4e2a\u6837\u5b50                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650874\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leoleoasd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7a0d\u5fae\u6539\u4e00\u4e0b\u5c31\u53ef\u4ee5\u67e5 \u201c\u6709\u6307\u5b9a 5 \u4e2a tag \u4e2d 3 \u4e2a\u6216\u4ee5\u4e0a\u7684\u201d \u56fe\u7247\u7b49\u9ad8\u7ea7\u641c\u7d22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650875\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : Nillouise <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @leoleoasd \u8fd9\u6837\u6027\u80fd\u4e0a\u80fd\u6ee1\u8db3\u8981\u6c42\u5417\uff1f\u770b\u7740\u529f\u80fd\u786e\u5b9e\u662f\u53ef\u4ee5\u8fd9\u6837\u5b9e\u73b0\u7684\uff0c\u4f46 pixiv \u5c11\u8bf4\u4e5f\u6709 10 \u4e2a tag \u4ee5\u4e0a\uff0c\u540e\u9762\u7684\u5b50\u67e5\u8be2\u53ef\u4ee5\u67e5\u51fa 10w \u7684 image_id\uff0c\u6211\u6709\u70b9\u6000\u7591\u80fd\u4e0d\u80fd\u5728 1s \u5185\u8fd4\u56de\u3002<br \/>\u4e0d\u8fc7\u5982\u679c\u5206\u5e93\u5206\u8868+\u5f88\u591a\u4e2a\u8bfb\u526f\u672c\u7684\u8bdd\uff0c\u5e94\u8be5\u4e5f\u80fd\u63d0\u9ad8\u5f88\u591a\u6027\u80fd\u5427\uff0c\u770b\u8d77\u6765\u4e4b\u524d\u6211\u6709\u70b9\u601d\u7ef4\u8bef\u533a\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650876\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : leoleoasd <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Nillouise #4 \u6027\u80fd\u4e0d\u592a\u6e05\u695a\uff0c\u53ea\u77e5\u9053\u8fd9\u6837\u53ef\u4ee5\u5b9e\u73b0\uff0c\u6ca1\u6709\u771f\u6b63\u5b9e\u8df5\u8fc7                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650877\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Soar360 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pgsql \u7684 gin \u5012\u6392\u7d22\u5f15\u4e86\u89e3\u4e0b\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650878\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : eason1874 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             MySQL \u80fd\u505a\uff0c\u7528 MySQL \u7684 WordPress \u4e0d\u5c31\u53ef\u4ee5\u8fd9\u6837\u4e48\u3002<\/p>\n<p>\u56fe\u7247\u8ddf\u6587\u7ae0\u4e00\u6837\u5728 posts \u8868\uff0c\u6807\u7b7e\u5728 terms \u8868\uff0c\u56fe\u7247\u548c\u6807\u7b7e\u7684\u5173\u7cfb\u5728 relationships \u8868\u3002<\/p>\n<p>relationships \u8868\u6709 post_id \u548c term_id\uff0c\u8fde\u8868\u67e5\u8be2\u5c31\u884c\u4e86\uff0c\u5355\u6807\u7b7e\u591a\u6807\u7b7e\u90fd\u4e00\u6837\u67e5\uff0c\u6211\u505a\u8fc7\uff0c\u53ea\u662f\u5f53\u65f6\u6570\u636e\u5c11\uff0c\u4e0d\u77e5\u9053\u6570\u636e\u591a\u4e86\u6027\u80fd\u600e\u4e48\u6837\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650879\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : superrichman <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u641e\u5f20\u4e2d\u95f4\u5173\u7cfb\u8868\u5c31\u80fd\u505a\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650880\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dd112389 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e09\u5f20\u8868, \u7528\u8868\u8fde\u63a5\u67e5, \u4e0d\u7528\u5b50\u67e5\u8be2.<br \/>\u5efa\u7acb\u5408\u9002\u7684\u7d22\u5f15, \u8fde\u63a5\u67e5\u8be2\u80fd\u7f29\u5c0f\u8303\u56f4\u7684\u6761\u4ef6\u5199\u524d\u9762.<br \/>(\u6700\u597d\u5148\u67e5\u8be2\u5c0f\u8868).                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650881\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : moen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728\u67d0\u4e2a pixiv \u5458\u5de5\u7684[\u57fa\u7840\u8bbe\u65bd\u4ecb\u7ecd]( https:\/\/speakerdeck.com\/konoiz\/pixivniokerumysqlyun-yong-falseshi-ji?slide=13)\u91cc\u53ef\u4ee5\u770b\u5230\u4ed6\u4eec\u641c\u7d22\u662f\u7528 Solr \u6765\u5b9e\u73b0\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5650882\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SjwNo1 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u7528\u4e2d\u95f4\u8868\u7684\u8bdd\uff0c\u6b64\u8868\u81a8\u80c0\u901f\u5ea6\u592a\u5feb\u4e86\uff5e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u50cf pixiv \u90a3\u79cd\u6839\u636e\u6807\u7b7e\u641c\u7d22\u56fe&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/432678"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=432678"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/432678\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=432678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=432678"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=432678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}