tarekdj / db-benchmark

http://forum.nette.org/cs/14592-lean-mapper-tenke-orm-nad-dibi?p=5#p106521
0 stars 0 forks source link

Query caching #6

Open michield opened 10 years ago

michield commented 10 years ago

We've been running the benchmarks without clearing query cache between all the tests, which probably makes the results incorrect.

I added a "reset query cache" in the PDO test and the difference is that before doing that the PDO result was:

PDO | Time: 0.067 s | Memory: 0.5 MB | PHP: 5.5.9-1ubuntu4.2

and after it was:

PDO | Time: 0.891 s | Memory: 0.5 MB | PHP: 5.5.9-1ubuntu4.2

That's a factor 13 difference, which is fairly significant.

This is the caching mechanism in Mysql, when loads of duplicate queries are performed.

tarekdj commented 10 years ago

This doesn't affect our library choice.