Optimize some record reading.