SELECT name, count(*) as similar_names_count
FROM users
WHERE name = ANY('{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}')
GROUP BY name
LIMIT 100;
EXPLAIN ANALYZE
SELECT name, count(*) as similar_names_count
FROM users
WHERE name = ANY('{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}')
GROUP BY name
LIMIT 100;