More performant sql query for getLastTimestamp + new metric
Merge pull request #98 from wajam/manu-getlasttimestamp-optimisation

More performant sql query for getLastTimestamp + new metric