跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 大佬们,来寻求个方案,对比查询怎么才能最快

发表于

有这样一个需求,首先是有 100 万个 md5 值(不重复,提前录入)

然后每隔 10 秒会产生 300 个新的 md5 值

现在的要求是拿这 300 个去与 100 万个对比,查询出这 300 个里面哪些是包含在那 100 万个里面的,需要极致的速度,越快完成越好。

之前同事用 redis 集合处理,据说好像是 30-40 毫秒(我不确定这个时间是否准确),依旧说还没达到要求,还能不能再极限一点

对了,还有个要求,就是那 100 万个 md5 值,不能丢,需要持久化保存,系统重启之后依旧要在。

求大佬们指点一下思路,主要是速度要快,快,快。

先提前感谢各位大佬的思路。

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.