Giter Club home page Giter Club logo

db-benchmark's People

Contributors

dg avatar f3l1x avatar hrach avatar michield avatar tarekdj avatar

Watchers

 avatar  avatar  avatar  avatar

db-benchmark's Issues

Query caching

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.

results

I've ran it quite a few times on my local machine now, with generally similar results:

NDB 2.2 | Time: 1.950 s | Memory: 14.0 MB | PHP: 5.5.3-1ubuntu2.3 | Nette: 2.2.x
NotOrm | Time: 8.290 s | Memory: 7.3 MB | PHP: 5.5.3-1ubuntu2.3
PDO | Time: 0.089 s | Memory: 0.3 MB | PHP: 5.5.3-1ubuntu2.3
FluentPDO | Time: 0.721 s | Memory: 5.4 MB | PHP: 5.5.3-1ubuntu2.3
LeanMapper | Time: 1.668 s | Memory: 15.9 MB | PHP: 5.5.3-1ubuntu2.3
Doctrine2 | Time: 10.326 s | Memory: 27.4 MB | PHP: 5.5.3-1ubuntu2.3 | Doctrine: 2.4.2

Benchmark using custom query on harp-orm library

Sample query:

'SELECT DISTINCT u.id FROM %s AS listuser
CROSS JOIN %s AS u
CROSS JOIN %s AS listmessage
LEFT JOIN %s AS um
ON (um.messageid = %d AND um.userid = listuser.userid)
WHERE true
AND listmessage.messageid = %d
AND listmessage.listid = listuser.listid
AND u.id = listuser.userid
AND um.userid IS NULL
AND u.confirmed and !u.blacklisted and !u.disabled'

Benchmark using custom query on FluentPDO library

Sample query:

'SELECT DISTINCT u.id FROM %s AS listuser
CROSS JOIN %s AS u
CROSS JOIN %s AS listmessage
LEFT JOIN %s AS um
ON (um.messageid = %d AND um.userid = listuser.userid)
WHERE true
AND listmessage.messageid = %d
AND listmessage.listid = listuser.listid
AND u.id = listuser.userid
AND um.userid IS NULL
AND u.confirmed and !u.blacklisted and !u.disabled'

Benchmark using custom query on Pixie library

Sample query:

'SELECT DISTINCT u.id FROM %s AS listuser
CROSS JOIN %s AS u
CROSS JOIN %s AS listmessage
LEFT JOIN %s AS um
ON (um.messageid = %d AND um.userid = listuser.userid)
WHERE true
AND listmessage.messageid = %d
AND listmessage.listid = listuser.listid
AND u.id = listuser.userid
AND um.userid IS NULL
AND u.confirmed and !u.blacklisted and !u.disabled'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.