Fix #572 - Stat Database max row before purge
Improved query to avoid listing a big row.

Also changed the pruge trigger to 1.5 time the max row count (2 time is
quite long in fact).
Merge pull request #620 from CyrilPeponnet/fix-db-stat-purge

Fix #572 - Stat Database max row before purge

Reviewed.