如何使我的搜索在c#.net中运行得更快 [英] how to make my searching run faster in c#.net

查看:85
本文介绍了如何使我的搜索在c#.net中运行得更快的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MS Access作为数据库.我有一个具有20k客户记录的表,我想进行通用搜索,即当用户尝试在文本框中输入任何文本时,它应该在数据库表的所有列中进行搜索(我有更多然后是10列),并且非常快地将结果显示到Gridview中,但没有发生.这需要花费更多的时间,然后才能预期...任何人都可以建议我解决此问题吗? blockquote> ms访问不可用(包括文本搜索).最好的方法是转到sql server Express版.

否则,只需将表导出为csv并对此进行文本搜索.它难看,容易出错且需要更多工作,但是好吧...这是ms访问权限...

祝您好运!


搜索通常是通过Lucene完成的: http://lucene.apache.org/core/ [^ ]

您也可以使用我的文章: hOOt-全文搜索引擎 [ ^ ]

您必须了解的是,索引数据需要花费一些时间,以节省搜索数据的时间,而且在数据库行的上下文中,您必须在搜索中考虑已删除的行.


我建​​议您打开MySQL服务器.它的开源软件,可以可靠地满足您的需求,并且最好的部分是它提供了全文搜索"功能,可以让您搜索表中的任何信息.


I am using MS access as my database.I have a table with 20k records of customer and i wanna do universal search i.e when user tries to enter any text on textbox it should search in all columns of database table(i have more then 10 columns) and display result to gridview very fast,but its not happening.It takes more time then expected...can any one suggest me solution on this ?

解决方案

ms access isn''t capable (including text-search). The best way to go would be to move to sql server express edition.

Otherwise just export the table as csv and do a text search on that. Its ugly, error prone and more work, but well... that''s ms access...

Good luck!


Searching is usually done with Lucene : http://lucene.apache.org/core/[^]

You can also use my article : hOOt - full text search engine[^]

What you must be aware of is that it will take time to index the data to save time in searching for data, and also in the context of database rows you must take deleted rows into account in your searches.


I would suggest you to switching on MySQL server. its open source, reliable to suit your need and the best part is that it provides "FULLTEXT" search, which will let you search any information in your table.


这篇关于如何使我的搜索在c#.net中运行得更快的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆