SQL Server Performance

Whats faster, flat files or SQL table

Discussion in 'SQL Server 2005 General Developer Questions' started by Digs, Jun 5, 2009.

  1. Digs New Member

    I have 5000 txt files of Date,open, high, low, close, volume data. Each file is named after the stock symbol, like goog.txt or msft.txt

    They can be in one windows folder or many.

    Each txt file has about 5000 records in each (15 years of data).

    What is a faster forward read only approach for a website, place data in a single SQL table or read txt files.

    Currently I am using txt files, I import all the txt file data (say for msft.txt) into an array via .net files import code, then I use the array to filter period ranges ( ie between this day and that day etc)..BUt my testing is only on 50 or so txt files in a folder, what happens when I have 5000, in folder, or maybe 1000 in 5 separate folders..

    What wins, in speed, thats finding the data in a folder or finding the data in a SQL 2005 table ( indexed, using Idatareader with a WHERE clause.) so I can place into an array for manipulation ?
  2. FrankKalis Moderator

    It's not all about performance. From a maintainability perspective I would go with the database approach. Only one central storage place. only one permission hazzle, and only backup/restore plan needed.
  3. rohit2900 Member

    Go with database approach and try to segregate your files in groups with same data then design tables for them.

Share This Page