I'm trying out long polling for the first time.
In the PHP script I have a while-loop with a sleep-timer that freezes the script for 10 seconds, then it looks for new stuff in the database again.
I'm thinking performance and server/database load/connections:
What is worse for the server: Many GET-requests (ajax), or many opening/closing of the DB connection?
Would it in any way be better to use long polling but close and re-open the DB connection in each round of the while-loop (to free the limited number of connections)?