mysql order by rand taking a long time code example
Example: create new index takes long time postgresql
Create index with concurrency :
CREATE INDEX CONCURRENTLY users_name_idx ON users(name);
Create index with concurrency :
CREATE INDEX CONCURRENTLY users_name_idx ON users(name);