Profiling the database