Optimize Favourites speed with many schemas
Fix instrumentation check for pgsql 9.2-9.3