Be Excellent To Each Other

And, you know, party on. Dude.

All times are UTC [ DST ]




Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Questions Re Performance - C++ Datasets
PostPosted: Thu Jan 07, 2010 12:03 
User avatar
Excellently Membered

Joined: 30th Mar, 2008
Posts: 1268
Location: Behind you!
Hi Guys,

I hope this might be quick and painless, here my problem:

I have a dataset of over 10,000 rows each with around 100 columns. I can read this data (and it's only required to be read) from a Database and place it in a dataset very quickly (less than a fraction of a second) but when I iterate through the dataset to populate arrays and other program guff it takes ages (7 Seconds or so). I've checked what I'm populating from the dataset and that in itself is super quick and adds little overhead, all I'm doing is populating another data structure - little in the way of calculations apart from conversions.

What I don't understand is why it's taking so long to iterate through the dataset, when it's taken hardly any time to fill it.

* Are datasets the best way in C++ to manage database held data ( I can't think of anything else)?
* Are there any performance settings that might improve dataset read speeds?

This is all theory, as I'm not actually doing the work myself but I seem to be at the end of the sharp pointy stick named "get shit done".

All using C++ of which I think is .NET.

Cheers for any pointers (not &actual *pointers) or ideas


Top
 Profile  
 
 Post subject: Re: Questions Re Performance - C++ Datasets
PostPosted: Thu Jan 07, 2010 12:04 
SupaMod
User avatar
Est. 1978

Joined: 27th Mar, 2008
Posts: 69721
Location: Your Mum
Does the original dataset fit into memory but the new one doesn't?

Any chance of seeing the code?

_________________
Grim... wrote:
I wish Craster had left some girls for the rest of us.


Top
 Profile  
 
 Post subject: Re: Questions Re Performance - C++ Datasets
PostPosted: Thu Jan 07, 2010 12:24 
User avatar
Excellently Membered

Joined: 30th Mar, 2008
Posts: 1268
Location: Behind you!
Well there's only one dataset. It's populated from the DB. It's then used to populate a different data structure.

I don't have the code to show, I've only been able to review quickly over a webex. If I can get it and allowed, I'll post it.

Did find this... although C# I assume all .NET is equal: http://www.eggheadcafe.com/articles/20030205.asp


Top
 Profile  
 
 Post subject: Re: Questions Re Performance - C++ Datasets
PostPosted: Thu Jan 07, 2010 12:50 
User avatar
Excellent Member

Joined: 25th Nov, 2008
Posts: 1041
Unless there's something hideous in the underlying C++ code, I think you're reaching the performance limit of the DataSet. Here's an article comparing the performance of the DataSet to the DataReader: http://www.devx.com/vb2themax/Article/1 ... 54?pf=true

Personally I don't use DataSets, but more because they promote tight coupling and limit flexibility, although I suspect they're perfectly good for smallish apps.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Questions Re Performance - C++ Datasets
PostPosted: Thu Jan 07, 2010 13:09 
User avatar
Excellently Membered

Joined: 30th Mar, 2008
Posts: 1268
Location: Behind you!
Cheers guys. I'll see what else I can dig up.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Columbo, Mr Russell and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search within this thread:
You are using the 'Ted' forum. Bill doesn't really exist any more. Bogus!
Want to help out with the hosting / advertising costs? That's very nice of you.
Are you on a mobile phone? Try http://beex.co.uk/m/
RIP, Owen. RIP, MrC. RIP, Dimmers.

Powered by a very Grim... version of phpBB © 2000, 2002, 2005, 2007 phpBB Group.