reading from MySQL is faster or reading from a file is faster?

后端 未结 7 393
长发绾君心
长发绾君心 2021-01-19 14:36

HI

I got a doubt I have seen reading mysql data is slower in case of large tables...I have done lots of optimization but cant get through..

what I am thinki

相关标签:
7条回答
  • 2021-01-19 15:41

    Reading from a dbms (MySQL is one) is faster in most cases, because they have built in cache that will keep the data in memory, so next time you try to read the same data, you will not have to wait on the incredible slow hard drive.

    A dbms is essentially reading from your hard drive + a cache to speed things up (+ some data sorting algorithms). Remember, your database is stored on your hard drive :)

    0 讨论(0)
提交回复
热议问题