If you don't mind using a third party solution then this can do what you need easily: https://forums.alliedmods.net/showthread.php?t=242833
It combines rows and sends as many rows as the buffer allows with a single query. So you could get 90 down to 10 or something.
If you're interested, I can show you how to do it.