Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jbboehr
on Sept 8, 2021
|
parent
|
context
|
favorite
| on:
My £4 a month server can handle 4.2M requests a da...
My SQL is a bit rusty, but, to reduce the queries even further, I think you can do:
> SELECT user_id, COUNT(*) FROM comments WHERE user_id IN $1 GROUP BY user_id
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
> SELECT user_id, COUNT(*) FROM comments WHERE user_id IN $1 GROUP BY user_id