db: add time stamp; add stats of entries