function for truncating question and tag tables