Reduced the number of inserts made in AndOrQueryTests