Ok...I need to store thousands of data to MySQL or files. But I need to know what the fastest way would be..I prefer files as they are easier to manage in this case, but will it be faster? MySQL - loop -- check if data already in table (1 query) -- store data (1 query) - endloop Code (markup): File - loop -- check if file exists (file_exists) -- create and write to file (fopen, fwrite and fclose) - endloop Code (markup): Thanks in advance.
File operations generally take more time. So MySQL is always the best choice in any circumstance allowing many connections simultaneously.
The more data, the greater a database will outperform any sort of file based storage. File operations (even very simple ones) on folders with thousands/millions of files take forever. A database is definitely the way to go.