Add simple SQL statement tracing and timing
Create and use record_measures cache table

Improves session select performance slightly