怎么样 ...? Hashset(T)快速搜索子字符串......? [英] how ...? Hashset(T) to Search Substring Fast...?

查看:84
本文介绍了怎么样 ...? Hashset(T)快速搜索子字符串......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何使用Hashset(T)搜索字符串中的子字符串在庞大的数据库中...



I有一个文本框包含长字符串没有空格



和一个(.MDB)数据库集合的字符串超过9万项...
$ b使用Ms访问函数的Instr时$ b

搜索子字符串需要很多tym ...



我已阅读&的Hashset LT; T>它是否真的比数据库搜索更快...如果是,那么如何使用数据库与Hashset搜索子串快...



提前thnnxss ...


How to use Hashset(T) to Search substring In a String On a huge database ...

I have one Textbox that contain long string with No space

And One Of (.MDB) database collection of string Over 90 thousand items...

while using "Instr" of Ms access Function It took lot of tym to search substring ...

I have Read About Hashset<t> Is it realy faster then database search ... if yes then how to use database with Hashset to search substring Fast ...

Thnnxss in advance ...

推荐答案

HashSet< string> 并不打算对子字符串进行搜索。

HashSet存储其元素的哈希码,它提供了一种快速检查特定元素是否已被包含的方法(快速,因为搜索是针对哈希码而不是值进行的)。

A 列表< string> 可能更合适。
A HashSet<string> is not meant to do searches on substrings.
A HashSet stores the hashcodes of its elements, and it provides a fast way to check wheter a specific element is already contained or not (fast because the search is done against hash codes, not values).
A List<string> could be more suitable.


这篇关于怎么样 ...? Hashset(T)快速搜索子字符串......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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