Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

What is faster SQL or file system for data storage?

SQL

  • Please log in to reply
4 replies to this topic

#1 null

null

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 128 posts

Posted 24 April 2011 - 09:21 PM

What is faster on a Windows operating system(mainly but I would like the opinions of other os's, its just windows is common). SQL or using the file system. This is for fast access of data. The SQL database would be hosted on the local computer.
  • 0

#2 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 24 April 2011 - 10:47 PM

You appear to be asking an inappropriate question. SQL or file system for what data storage?

If you are accessing data in a linear fashion, then you do not "need" a database. If you require indexing, transactions, relations between data sets, normalization of data sets, searches and analytics, then a (relational) database management system would make sense and likely cannot be done as efficiently with files alone.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#3 null

null

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 128 posts

Posted 25 April 2011 - 02:51 AM

So this would be faster in say a game server, where player positions are reguraly queried in a database?
  • 0

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 25 April 2011 - 02:04 PM

In the case of a game server, why would you want this information on disk instead of in memory?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#5 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 25 April 2011 - 06:19 PM

If those data values are going to be used in game (last packets, positions, game data), the memory will be many hundreds of times faster than the disk. If you require persistence on data, then a binary save file, plain text file, or SQL database will all be equally valid solutions.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download