Jump to content

What is faster SQL or file system for data storage?

- - - - -

  • Please log in to reply
4 replies to this topic

#1
liamzebedee

liamzebedee

    Programmer

  • Members
  • PipPipPipPip
  • 129 posts
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.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
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.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
liamzebedee

liamzebedee

    Programmer

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

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 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
In the case of a game server, why would you want this information on disk instead of in memory?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
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.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users