English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have an application where there are 512 sets of 3 pieces of data "1|2|3|0>3|2|5|1>......." and I am wondering if opening the file thru filesystemobject in asp is faster than opening a connection to a mssql sql database and getting rows of data.

any help would be appreciated

2006-06-16 06:44:38 · 3 answers · asked by electrongalaxy 3 in Computers & Internet Programming & Design

so yes i am getting all the data at once and working on it (putting it into an array)

thanks everyone

2006-06-16 07:04:44 · update #1

3 answers

Your 512 sets is a very small amount of data. Flat files are always faster than databases in those situations, however, things like indexing the data, finding patterns and subsets etc. are things you would have to provide yourself. In general though, you should easily be able to read in all 512 sets into memory and use arrays/hashes/maps to do whatever manipulation you require.

2006-06-16 06:55:38 · answer #1 · answered by Gizmo L 4 · 6 2

It depends whether you are going to be reading the data sequentially (start to finish in a single pass), or whether you need to be able to read any particular item from the set at any given time.

If all you need is sequential access, a flat file will almost certainly be faster as it'll have buffering and won't have the overheads of a database. If you want random access, a database will almost certainly be faster, as that's what they're designed for.

2006-06-16 13:49:39 · answer #2 · answered by metavariable 4 · 0 0

Briefly:
If you're reading continuous records in bulk than text file is faster.
For random access you better to use a proper (SQL) database.

2006-06-16 13:49:38 · answer #3 · answered by Alp 3 · 0 0

fedest.com, questions and answers