Datareader.Read()比以往任何时候都慢 [英] Datareader.Read() IS SLOWER THAN EVER

查看:208
本文介绍了Datareader.Read()比以往任何时候都慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经阅读过有关此问题的各种论坛,但找不到答案.

为什么datareader.Read()太慢了什么时候读取第一行?

我正在使用一台好的PC(1gig ram,3ghz intel)上的数据库是Oracle 10g


更多信息:
>
这不是我第一次使用datareader.我将其用于大量查询,并且该问题(缓慢)出现在某些表上.是的,这是一张大桌子,但这不是原因.

我正在执行一个查询,该查询返回大约120行.如果我在SQLDEVELOPPER上执行查询,则大约需要0.02秒.好的,您会说哦,您对oracle开发者了,所以它通常会更快".


NAH!如果我用旧的东西(记录集,adodb的东西等)在VB6中执行相同的查询,则需要大约相同的时间!!!! 0.02秒!最差!我可以在VB6中执行查询并填充列表视图,其速度比在VB.NET中执行查询更快,并且我没有填充datagrid !!!!!!!

是的,您听到了我的声音!老式的VB6杂物比VB.NET system.data杂物要快.为什么?

我尝试使用ODBCcommand代替OracleCommand.一样 !它的慢慢慢慢!!!.

它有多慢? Datareader.Read()的第一次迭代大约需要55秒!对于用户将要在日常工作中使用的应用程序来说,这是完全不可接受的.

实际上,为了解决这个问题,我正在使用vb6进行查询,并在vb中使用了结果. net及其比VB.NET更快的速度但我真的不喜欢这样!

有没有人知道为什么它这么慢以及如何在不使用旧的vb6旧东西的情况下解决问题?

>预先感谢

Phil


**我真的不讨厌VB6.实际上,在过去的一年中,我使用VB6做了大量工作,这真是太好了.但是我们现在不在2008年,而是在1998年.
VB.NET应该能够在大约同一时间做同样的事情.



Hi everybody,

I've read all kind of forum about this issue but i can't find an answer.

Why the hell the datareader.Read() is ssooo slow when its time to read the first row ?

I'm on a good PC (1gig ram, 3ghz intel)
Database is Oracle 10g


More info :

Its not the first time im using datareader. I use it for lot of Queries and the problem (slow) appears on some table. Yes its a big table but it should not be the reason.

Im doing a querie that return about 120 rows.  If i execute the querie on SQLDEVELOPPER it takes about 0.02 seconds. Ok you'll say "Oh youre on oracle developper so its normally faster blablabla"


NAH ! IF I DO THE SAME QUERY IN VB6 with old stuff (recordset, adodb stuff, etc) it takes about the same TIME !!!!! 0.02 seconds !

Worst of ALL ! i can execute the query in VB6 and populate a listview and its faster than execution of the query in VB.NET and i did not populate datagrid !!!!!!!
 
Yes you heard me ! The old crapy VB6 stuff is faster than VB.NET system.data stuff. Why ?

I've try to use ODBCcommand instead of OracleCommand. Same thing ! Its slow slow slow !!!.

How slow it is ? about 55 secondes for the first iteration of Datareader.Read() ! Its totally unacceptable for an application thats going to be use by user in there day to day job.

Actually, to by pass this problem i'm using vb6 to do the query and im using the result in vb.net  and its faster than just VB.NET BUT i really dont like this !

Is there someone somewhere that know why its so slow and how to fix the problem without using old crapy vb6 stuff ?

Thank in advance

Phil


**I dont really hate VB6. in fact i did lot of stuff with VB6 in the past year and it was nice. But we're in year 2008 not in 1998.
     VB.NET should be able to do the same thing in about the same time.



推荐答案

我有同样的问题!但似乎那里没有解决办法?
I have the same problem! But seems there is no solution out there ?


这篇关于Datareader.Read()比以往任何时候都慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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