Log to file via PHP or log to MySQL database - which is quicker?

前端 未结 15 1297
故里飘歌
故里飘歌 2021-02-03 11:07

I have a database driven website serving about 50,000 pages.

I want to track each webpage/record hit. I will do this by creating logs, and then batch processing the logs

15条回答
  •  旧时难觅i
    2021-02-03 11:15

    You should try SQLite. It will give you both the speed of writing to a file as well as the power of a database.

    • php.net: sqlite2 extension
    • php.net: sqlite3 class
    • pdo provides a SQLite driver

提交回复
热议问题