473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Looking for a collection that uses hard disk as storage

GG
Anybody knows of any collection where is not stored in memory but using
hard disk instead?
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Jan 17 '08 #1
11 3036
does the word DataTable ring any bells for you?

Tom Dacon
Dacon Software Consulting

<GGwrote in message news:%2****************@TK2MSFTNGP04.phx.gbl...
Anybody knows of any collection where is not stored in memory but using
hard disk instead?
Thanks
*** Sent via Developersdex http://www.developersdex.com ***

Jan 17 '08 #2
GG
I just checked doc and says "Represents one table of in-memory data.".
In addition, I added 1 million rows of data and ram went from 18MB to 1
GIG.
If the data was stored in hard disk the Ram should have not grown
dramatically from 18MB.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Jan 17 '08 #3
a database?
Jan 17 '08 #4
does the word DataTable ring any bells for you?

DataTable in in memory... but can be *persisted* to a database or flat-
file : but that isn't the same thing.
Anybody knows of any collection where is not stored in memory but using
hard disk instead?
What is the reason for this requirement? I would suggest that in most
cases where this is an issue, a database would be the best option. For
example, SQL Server Express Edition is free, pretty robust, with good
support for most constucts (including xml support etc).

Marc
Jan 17 '08 #5
GG wrote:
Anybody knows of any collection where is not stored in memory but using
hard disk instead?
As others has stated then database is one obvious solution.

If you are on 64 bit you could also just use a collection.

What there are not space for in RAM will be on disk in the
pagefile.

Arne
Jan 18 '08 #6
"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:47***********************@news.sunsite.dk...
As others has stated then database is one obvious solution.

If you are on 64 bit you could also just use a collection.

What there are not space for in RAM will be on disk in the
pagefile.
Not really the best solution as it would slow the machine down dramatically.
It could work ok if you could specify it to use the swap file only but afaik
this is not an option.

Michael
Jan 18 '08 #7
Michael C wrote:
"Arne Vajhøj" <ar**@vajhoej.dkwrote in message
news:47***********************@news.sunsite.dk...
>As others has stated then database is one obvious solution.

If you are on 64 bit you could also just use a collection.

What there are not space for in RAM will be on disk in the
pagefile.

Not really the best solution as it would slow the machine down dramatically.
Why should a page file be slower than a ny other disk file ?
It could work ok if you could specify it to use the swap file only but afaik
this is not an option.
Since Windows only has a page file then ...

Arne
Jan 18 '08 #8
On Jan 17, 6:27 pm, Arne Vajhøj <a...@vajhoej.dkwrote:
Michael C wrote:
"Arne Vajhøj" <a...@vajhoej.dkwrote in message
news:47***********************@news.sunsite.dk...
As others has stated then database is one obvious solution.
If you are on 64 bit you could also just use a collection.
What there are not space for in RAM will be on disk in the
pagefile.
Not really the best solution as it would slow the machine down dramatically.

Why should a page file be slower than a ny other disk file ?
An in-memory collection whose contents are being paged to and from the
disk by the OS will have worse performance than a collection designed
to operate off the disk, as soon as you do any kind of search on it.

A collection that's designed to run off the disk will probably have an
indexing system so it doesn't have to load the entire file to find a
single element. But searching through a massive memory-based
collection will cause many pages to be swapped in, possibly causing
other useful pages to be swapped out and lowering performance down the
road.

For example, a binary search on a memory-based collection might end up
having to load half the file into memory, one page at a time, while a
disk-based collection could keep all the necessary indexing data in a
single page that never gets swapped out.

Jesse
Jan 18 '08 #9
Jesse McGrew wrote:
On Jan 17, 6:27 pm, Arne Vajhøj <a...@vajhoej.dkwrote:
>Michael C wrote:
>>"Arne Vajhøj" <a...@vajhoej.dkwrote in message
news:47***********************@news.sunsite.dk.. .
As others has stated then database is one obvious solution.
If you are on 64 bit you could also just use a collection.
What there are not space for in RAM will be on disk in the
pagefile.
Not really the best solution as it would slow the machine down dramatically.
Why should a page file be slower than a ny other disk file ?

An in-memory collection whose contents are being paged to and from the
disk by the OS will have worse performance than a collection designed
to operate off the disk, as soon as you do any kind of search on it.

A collection that's designed to run off the disk will probably have an
indexing system so it doesn't have to load the entire file to find a
single element. But searching through a massive memory-based
collection will cause many pages to be swapped in, possibly causing
other useful pages to be swapped out and lowering performance down the
road.

For example, a binary search on a memory-based collection might end up
having to load half the file into memory, one page at a time, while a
disk-based collection could keep all the necessary indexing data in a
single page that never gets swapped out.
"A collection that's designed to run off the disk will probably have an
indexing system"

Sounds as a great idea.

But I get an even better idea. Let us implement that in memory as well.
We could call it Hashtable or Dictionary.

:-)

Arne
Jan 18 '08 #10
On Thu, 17 Jan 2008 18:44:44 -0800, Jesse McGrew <jm*****@gmail.comwrote:
>Why should a page file be slower than a ny other disk file ?

An in-memory collection whose contents are being paged to and from the
disk by the OS will have worse performance than a collection designed
to operate off the disk, as soon as you do any kind of search on it.
Why? There's no a priori reason to believe this is true, even though it's
true that _some_ in-memory collections may not be as effecient as a
disk-based database.
A collection that's designed to run off the disk will probably have an
indexing system so it doesn't have to load the entire file to find a
single element. But searching through a massive memory-based
collection will cause many pages to be swapped in, possibly causing
other useful pages to be swapped out and lowering performance down the
road.
You're assuming that the in-memory structure would not have a similar
indexing mechanism.

Now, I don't know the implementation of DataTable. But as a general
concept, there's absolutely no reason it couldn't be indexed in basically
the same way as a database. Conversely, if a database implements (for
example) an index as a simple sorted array that uses a binary search, it's
going to have the exact same liability that an in-memory structure paged
to the disk using the same indexing scheme would have.
For example, a binary search on a memory-based collection might end up
having to load half the file into memory, one page at a time, while a
disk-based collection could keep all the necessary indexing data in a
single page that never gets swapped out.
If that's a concern, why wouldn't someone just have a similar "index only"
data section for their data structure for the in-memory implementation?

It seems to me that if all you know is that one implementation is a
disk-based database and another is an in-memory data structure, that that
is not nearly enough information to tell you which will perform better.

Pete
Jan 18 '08 #11
Hi,
There is one, it;s called MS-SQL server (or SQL Express)

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
<GGwrote in message news:uQ**************@TK2MSFTNGP05.phx.gbl...
>I just checked doc and says "Represents one table of in-memory data.".
In addition, I added 1 million rows of data and ram went from 18MB to 1
GIG.
If the data was stored in hard disk the Ram should have not grown
dramatically from 18MB.

Thanks


*** Sent via Developersdex http://www.developersdex.com ***

Jan 18 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Angie | last post by:
Hello, My name is Angela Mastrodonato. I'm a web designer who would like the assistance of a php programmer. Some of my clients have requested more dynamic web sites, and I am in the beginning...
4
by: Simon Cooke | last post by:
Hi there; A while back when I was in Albany, NY, I came across what looked like a really great C++ book for the experienced programmer. Unfortunately, I couldn't buy it and take it with me...
5
by: Ben Jeurissen | last post by:
Hello, I have to deal with the following issue in C++: Two threads are started from the main thread, both capturing images from a different firewire camera. Both threads take shots of 460800...
4
by: Pedro Miguel Carvalho | last post by:
Greetings. I'm creating a project that as a intricate relation between object kind of like a set where each object in the set can be connect to a subset of object of the set and objects not in...
2
by: Jeff | last post by:
Hi A client is installing a new 15000 SCSI hard drive, in addition to a 7200 IDE, on their server, running Terminal Server 2000, and has asked this question. Does it make a difference where...
5
by: Jeff Stewart | last post by:
Let's say I create a collection of DateTime objects like so: Dim clxn_Times As Collection = New Collection() Let's go on to say I add 3 elements to the collection. How do I pull off the...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
15
by: vk02720 | last post by:
Hi, I am trying to implement garbage collection for C/C++ mainly for learning purpose. I dont know where to start. For example - Basic questions - How do I identify the variables that contain...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.