如何在VB.NET中计算大量数据集 [英] How to calculate lots of datasets in VB.NET
问题描述
嘿那里,
你们中的任何人都可以给我一个建议如何在VB.NET中制作一个快速的方法来制作一个能够处理很多来自MSSQL的数据(数据集> 400.000)?
谢谢。
干杯
亚瑟
其实我是不显示任何数据。
这是一个将结果写入数据库的分析
嘿!我的意思是datarows
我会更详细一点:
我有一个城市数据库和另一个包含酒店的数据库与城市相关的价格。
我在一个循环中查询所有城市的所有酒店
我把城市放在了一个arraylist和酒店。
基于这些数据,我必须做一些数学运算并用结果填充数据表。
不幸的是,运行需要很长时间(> ; 3小时)
您有什么建议如何加快速度吗?
Hey there,
Does anybody of you can give me an advice howto make in VB.NET a quick way to make a function which handles with a lot of data from a MSSQL (datasets > 400.000)?
thanks.
Cheers
Arthur
Actually i dont display any data.
It is a analysis which write the result into a database
Hey! I meant datarows
I will go a little bit more in detail:
I have a database with cities and another database with hotels including a price linked to a city.
I am querying to get all hotels for all cities in a loop
I put the cities in an arraylist and the hotels as well.
Based on these data I have to do some math operations and fill a datatable with the results.
Unfortunatley it takes very long to run (> 3 hours)
Do you have any advice how to speed it up?
推荐答案
如果你是的话,无需获取所有记录在列表中显示这些记录(假设)。只需使用分页并根据页面大小获取数据。
希望它有所帮助。
No need to fetch all the records if you are displaying these records in a list (assuming). Just use paging and fetch the data according to the page size.
Hope it helps.
嘿!
感谢您的消息!!
是的我当然在一个数据库中使用2个表:)
我做了你的建议并把它放在一个SQL字符串中,其余的都放在VB.net中。
现在,它的工作非常好而且非常快: )
感谢您的帮助
干杯
Hey!
Thanks for your msgs!!
yes of course I am using 2 tables in one database:)
I did what you suggested and put in a SQL string and the rest in VB.net.
Now, its working really fine and really fast :)
Thanks for your help
Cheers
这篇关于如何在VB.NET中计算大量数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!