Depending on your operating system, I suggest you use the indexing service, Windows Desktop Search, or the latest version of Windows Search. This solves your keyword-based file search problem, eliminates performance issues regarding the number of files in a folder, scales and easily extends.
The DSearch example at http://msdn.microsoft.com/en-us/library/dd940335(VS.85).aspx does almost what you want and is easy to implement.
For example, if you request a million files and you need to move the file to subfolders to increase performance, you can simply create folders and move files. You will not need to change the code.
If you need to change the way you apply keywords, for example, use keywords for file summary properties, you only need to change the query.
- , OleDB. (AQS), Microsoft COM, SQL .
, .. - .
MSDN http://social.msdn.microsoft.com/Search/en-US?query=windows+search
Windows Search http://msdn.microsoft.com/en-us/library/bb286798(VS.85).aspx
. (. - ? - ?.
~ 300 000 * tabcontrol.cs " . 4000 , , , 300 -600ms.
- " " " Windows", 300 000 58GB "filename: tabcontrol" 1,25 0,13 0,26 .
. DSearch http://msdn.microsoft.com/en-us/library/dd940335(VS.85).aspx , .
" " http://blogs.msdn.com/b/coding4fun/archive/2007/01/05/1417884.aspx
- , . , Windows Desktop Search API . , , Vista Windows XP.