grep, sed 或者,解析放到数据库里,再建个索引,嗖嗖的
2009/11/7 <[email protected]> > Berkeley DB or Tokyo Cabinet也不是我想要的方案。 > 我自己再看看吧。好像记得在perlchina会上和李俊良或者是agentzhang谈起过。记不清了。 > > 2009/11/6 cnhack TNT <[email protected]> > > Berkeley DB or Tokyo Cabinet ? >> >> 2009/11/6 joe jiang <[email protected]> >> >> Hash 的 Hash 也许是个办法,或者用 Load Balance 来实现多节点的分担。 >>> >>> 减少 Hash 的数据量可能会提高效率。 >>> >>> 2009/11/6 <[email protected]> >>> >>> ...具体说一下:数据条数在100-1200万之间吧。读入后内存占用量到10G左右。 >>>> >>>> 现在,我需要在这10G数据中快速查找到我想要的数据,现在用hash存储这些数据然后来查找的话我感觉速度不是很快,所以想问问大家有没有更好的解决方案,或者是相关的算法。 >>>> 或者遇到这种问题,该从哪方面入手? >>>> >>>> Thank You, >>>> Alexe >>>> Blog:http://alexe.cublog.cn/ >>>> >>>> 2009/11/6 宇捷 <[email protected]> >>>> >>>> 100万条记录其实不多,要看你的记录是什么数据类型,这不是perl的问题,而是算法的问题。 >>>>> >>>>> >>>>> >>>>> *发件人:* grbounce-_mwj1quaaadplfc8fq-7oyyqfcvs3wxt=hfahe=163.com@ >>>>> googlegroups.com [mailto:grbounce-_mwj1quaaadplfc8fq-7oyyqfcvs3wxt >>>>> [email protected]] *代表 *[email protected] >>>>> *发送时间:* 2009年11月5日 22:02 >>>>> *收件人:* [email protected] >>>>> *主题:* [PerlChina] 寻找更快的数据搜寻方案 >>>>> >>>>> >>>>> >>>>> Hi all, >>>>> >>>>> >>>>> >>>>> 我现在需要将大约100万条记录存储到hash中,然后在这个hash中查找某一个数据,或者删除某个数据。 >>>>> >>>>> 因为hash本身遇到这么大的数据量不占优势,例如会比数据本身多占用更多的内存,数据量太大以后搜索的速度并不是很快等等 >>>>> >>>>> >>>>> >>>>> 谁有更好的Perl方案适合这种项目? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Thank You, >>>>> >>>>> Alexe >>>>> >>>>> Blog:http://alexe.cublog.cn/ >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ 您收到此信息是由于您订阅了 Google 论坛“PerlChina Mongers 讨论组”论坛。 要在此论坛发帖,请发电子邮件到 [email protected] 要退订此论坛,请发邮件至 [email protected] 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛 -~----------~----~----~----~------~----~------~--~---
