Changed RecordMapper to use prepared statements to improve performance and memory use