Should we use MySQL instead of LiteDB and flatfile storage?

Discussion in 'Performance Tweaking' started by BrianJAR, Mar 15, 2017.

Thread Status:
Not open for further replies.
  1. Hello,

    What is the best thing to do for the best performance?
    - Use MySQL for every plugin that supports it.
    - Only use MySQL for plugins that stores allot of data CoreProtect for instance.

    Why should or shouldn't we use MySQL for every plugin that stores data and supports it? What are the benefits of using MySQL / LiteDB performance wise?
     
  2. MySQL is the best database storage you can use and its not just faster than the other ones but you can also use them in many other ways. I suggest you buy it separately and not from your host where you can make multiple database and not just one since hosts offer just 1 even if you pay for it.
     
  3. I've heard mariadb is better.
     
  4. Maybe, what I know for sure is that it's made by the developers of MySQL xD
     
  5. electronicboy

    IRC Staff

    mariadb is a fork of MySQL, Flatfile VS MySQL is dependent on what you need, also worth noting that the configuration files in spigot are actually stored in memory via a LinkedHashMap which has the advantages of not having to perform an external request at the cost of info being persistently in memory. databases especially come into play when you have large amounts of data that you really don't wanna store in memory, or when you wanna synchronize state between multiple running instances. The downside to databases is that you generally have to write your code in a manner where you can handle without polling the DB on every instance, by using caches smartly and pulling objects into memory as needed, or using runnables properly to handle db stuff async and return to the main thread as needed to interact with the world
     
    • Agree Agree x 1
Thread Status:
Not open for further replies.