title: Will polling from a SQL DB instead of a file for chat application increase performance?
body: <p>I'm working on a chat application which I would love to use a SQL db for.</p>
  
  <p>My problem is, after a few google searches, i have people telling me from one site, that using a DB would be much slower then using a normal file (e.g Text or JSON file), but then on some other sites, people are saying the complete opposite. And I don't know about you guys, but when it comes to creating web apps for users, the users always come first. </p>
  
  <p>So as much as I'd love to use a SQL DB as 1.) I have good experience with it and 2.) it allows me to make the application much more cooler (more features). but if it would slow things down on the users end (<strong>a noticeable lag</strong>), then its a no-no.</p>
  
  <p>Either way, I will be "polling" the server continuously with AJAX and PHP to check the file/DB (for new messages, contact requests, ect ect).</p>
  
  <p>Also, incase your wondering, the application wont be like a 1-to-1 chat, it will have "rooms" where multiple users can join and talk with all users joining in. The users will also be able to request a "private chat" with another user, where a 1-to-1 connection opens up.</p>
  
  <p>So, MySQL Database OR a boring TEXT/JSON/OTHER file, in regards to performance?</p>
  
  <p>Oh, one more thing, I don't want to use any third party libraries or APIs. Hate relying on other peoples work (been let down to many times).</p>