速度问题 [英] SPEED QUESTION

查看:162
本文介绍了速度问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的表单中加载()

Dim daSeaInvoice作为新的SqlDataAdapter(从InvoiceHeader中选择*;从invoicedetail选择

*,conSea)

dim myDataSet作为新数据集()

daSeaInvoice.fill(mydataset)。


因为我在invoiceheader中获得了超过50000条记录,并且在200,000条记录中

invoicedetail

加载表单似乎很慢...


解决方案
"艾格尼丝" < AG *** @ dynamictech.com.hk>在新闻中写道:OxcbxEedEHA.3476

@ tk2msftngp13.phx.gbl:

当我在invoiceheader中获得超过50000条记录并且在
invoicedetail
加载表单似乎很慢...




因为你要将50,000条记录加载到数据集中......它''吮吸所有

你的记忆。


如果有> 20,000行,我就不会使用数据集。

请改用datareader。


-

Lucas Tam(RE ******** @ rogers.com)

请删除删除来自回复时的电子邮件地址。
http://成员。 ebay.com/aboutme/coolspot18/


我敢打赌它看起来确实很慢。你带来了大量的

数据,其中很少用户实际上会看到这些数据。

所以...如何不加载整个工作一下子?也许你可以加载

只是最新的数据,也许足以填满你的网格或者你正在使用的任何
,然后等到你的用户想要''使用一些用户指定的标准,回页''或者做一个

过滤搜索记录。然后返回

并加载感兴趣的数据。我知道这是一个更多的工作,但没有什么

免费提供。


没有违法行为,但这有点像那些添加的人10个

项目到下拉列表框并想知道为什么它不能太漂亮

好​​。


努力不要烦躁而不是成功,

Tom Dacon

Dacon软件咨询


" Agnes" < AG *** @ dynamictech.com.hk>在消息中写道

新闻:Ox ************** @ tk2msftngp13.phx.gbl ...

在我的表单载入中( )
Dim daSeaInvoice As New SqlDataAdapter(" select * from InvoiceHeader
; select * from invoicedetail,conSea)
dim myDataSet as new dataset()
daSeaInvoice.fill(mydataset) 。

因为我在invoiceheader中获得了超过50000条记录,并且在发票详情中超过了200000条记录
加载表单似乎很慢...



这次我明白了。但我还有另一个问题。在我的Invoiceheader中,我

可以加载当前月份的数据

但是..在我的invoicedetail中,没有字段存储date

如何从invoicedetail中选择date condition? ....


Dim daSeaInvoice作为新的SqlDataAdapter(" select * from InvoiceHeader from

month = currentmonth; select * from invoicedetail where ???, conSea)

谢谢


Tom Dacon < TD **** @ community.nospam> | b?l¥ó

新闻:ui ************* @TK2MSFTNGP11.phx.gbl¤¤??? g ...

我敢打赌它确实看起来很慢。你带来了大量的数据,用户实际上看不到这些数据。
那么......如何不同时加载整个作品?也许你可能只需加载最新数据
,也许足以填满你的网格或者你正在使用的任何东西,然后等到你的用户想要回页或做一个
使用一些用户指定的标准过滤搜索记录。然后返回
并加载感兴趣的数据。我知道这是一个更多的工作,但没有什么是免费的。

没有冒犯的意图,但这有点像那些添加10万件物品的人下拉列表框,并想知道为什么它不太漂亮
好。

努力不要烦躁而不是成功,
Tom Dacon Dacon软件咨询公司

Agnes < AG *** @ dynamictech.com.hk>在消息中写道
新闻:Ox ************** @ tk2msftngp13.phx.gbl ...

在我的表单中加载()
Dim daSeaInvoice As New SqlDataAdapter(select * from InvoiceHeader


; select

* from invoicedetail,conSea)
dim myDataSet as new dataset()
daSeaInvoice.fill(mydataset)。

因为我在invoiceheader中获得了超过50000条记录,并且在发票详情中有超过200000条记录
加载表单似乎很慢...




In my form load()
Dim daSeaInvoice As New SqlDataAdapter("select * from InvoiceHeader ;select
* from invoicedetail, conSea)
dim myDataSet as new dataset()
daSeaInvoice.fill(mydataset).

As I got over 50000 records in invoiceheader and over 200000 record in
invoicedetail
It seems quit slow to load the form...


解决方案

"Agnes" <ag***@dynamictech.com.hk> wrote in news:OxcbxEedEHA.3476
@tk2msftngp13.phx.gbl:

As I got over 50000 records in invoiceheader and over 200000 record in
invoicedetail
It seems quit slow to load the form...



Becuase you''re loading 50,000 records into a dataset... it''s sucking up all
your memory.

I wouldn''t use a dataset if there are >20,000 rows.

Use a datareader instead.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/


I''ll just bet that it does seem quite slow. You''re bringing over a ton of
data, little of which the user is ever actually going to be looking at.
So...how about not loading the whole works all at once? Maybe you might load
just the most recent data, perhaps enough to fill your grid or whatever
you''re using, and then wait until your user wants to ''page back'' or do a
filtered search on records, using some user-specified criteria. Then go back
and load the data of interest. I know it''s a little more work, but nothing
comes for free.

No offense intended, but this is kind of like those people who add 100,000
items to a drop-down list box and wonder why it doesn''t work too pretty
good.

Trying hard not to be irritable and not quite succeeding,
Tom Dacon
Dacon Software Consulting

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...

In my form load()
Dim daSeaInvoice As New SqlDataAdapter("select * from InvoiceHeader ;select * from invoicedetail, conSea)
dim myDataSet as new dataset()
daSeaInvoice.fill(mydataset).

As I got over 50000 records in invoiceheader and over 200000 record in
invoicedetail
It seems quit slow to load the form...



this time I understand . But I got another question. in my Invoiceheader,I
can load the current month''s data
but .. in my invoicedetail, there is no field to store the"date"
How can I select from invoicedetail with the "date condition" ....

Dim daSeaInvoice As New SqlDataAdapter("select * from InvoiceHeader from
month = currentmonth;select * from invoicedetail where ???, conSea)
thanks

"Tom Dacon" <td****@community.nospam> |b?l¥ó
news:ui*************@TK2MSFTNGP11.phx.gbl ¤¤???g...

I''ll just bet that it does seem quite slow. You''re bringing over a ton of
data, little of which the user is ever actually going to be looking at.
So...how about not loading the whole works all at once? Maybe you might load just the most recent data, perhaps enough to fill your grid or whatever
you''re using, and then wait until your user wants to ''page back'' or do a
filtered search on records, using some user-specified criteria. Then go back and load the data of interest. I know it''s a little more work, but nothing
comes for free.

No offense intended, but this is kind of like those people who add 100,000
items to a drop-down list box and wonder why it doesn''t work too pretty
good.

Trying hard not to be irritable and not quite succeeding,
Tom Dacon
Dacon Software Consulting

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...

In my form load()
Dim daSeaInvoice As New SqlDataAdapter("select * from InvoiceHeader


;select

* from invoicedetail, conSea)
dim myDataSet as new dataset()
daSeaInvoice.fill(mydataset).

As I got over 50000 records in invoiceheader and over 200000 record in
invoicedetail
It seems quit slow to load the form...




这篇关于速度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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