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).