Add profiling for database interaction