我应该选择哪种数据库来快速查询? [英] Which database should I prefer to get fast query searches?

查看:62
本文介绍了我应该选择哪种数据库来快速查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应该由C#.Net支持



1.我的数据搜索会将输出提供给Datatable并将其加载到Datagrid中。

2.用户将从文本框更改事件中搜索。

3.数据库至少有100K行和150列。

4.搜索字段可以是任何来自150的varchar和integer数据类型混合的字段。

5.有一个blob字段,每行的图像为8 KB。



我已经在Access中使用了它,但是我的应用程序需要太长时间,并且有时会挂起进入无响应状态。



需要紧急求助。



我尝试了什么:



我尝试过使用多种类型使用数据适配器和数据读取器的数据查询但几乎没有任何区别。

Should be supported by C#.Net

1. My Data Search would give me output to a Datatable and that would be loaded into Datagrid.
2. User would search from a textbox change event.
3. Database has minimum of 100K rows and 150 columns.
4. Search field can be any of the fields from 150 which varchar and integer datatypes mixed.
5. Has a field of blob which is has a image of 8 KB on each row.

I already have it in Access but my application takes too long and also, hangs up sometime going into Not Responding situation.

Need urgent help please.

What I have tried:

I have tried using multiple type of data queries using data-adapter and data-reader but barely makes any difference.

推荐答案

没有一个数据库比其他所有更好 - 它是依赖于数据,q uery,您的PC,您如何访问数据库文件,以后您使用的数据以及许多其他因素,例如这应该是多用户数据库吗? - 我们都不知道,因为我们无法看到您的屏幕,访问您的硬盘或阅读您的想法。



首先分析您的代码以查找它的速度很慢,而且速度有多慢:你可以使用秒表课程手动完成这项操作,如果你没有;可以访问探查器。

当你知道什么是慢的,有多慢它是,你可以开始考虑优化它 - 但直到那时!
There is no "one database" which is better than all the others - it's going to depend on the data, the query, your PC, how you are accessing the database file, what you are doing with the data afterwards, and a host of other factors such as "should this be a multiuser DB?" - none of which we have any idea about because we can't see your screen, access your HDD, or read your mind.

Start by profiling your code to find out where it's slow, and exactly how slow it is: you can do this manually using the Stopwatch class if you don;t have access to a profiler.
When you know what is slow, and how slow it is, you can start thinking about optimising it - but not until then!


这篇关于我应该选择哪种数据库来快速查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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