Click to See Complete Forum and Search --> : MySQL database traffic with php chat


sakherq
12-11-2007, 07:30 AM
iam aiming to add php Ajax chat in my web site ,,
i use one database of 5 available by the hosting plan
and this chat system need 2 more tables in the database
and these 2 tables will suffer from high traffic
because chat clients will keep send Ajax requests every 5 seconds
to get new posts in the chat table .
i was thinking about creating another database for that 2 tables
so it can decrease load on the old main database
but this will require reading from the 2 databases to get chat clients names
which stored in the database
is it better to keep the new 2 tables in the main database to keep it fast
hence i will keep running queries depending on the main Database and it will remain in server RAM and no other Database will reserve space in the RAM

sakherq
12-12-2007, 01:48 AM
any idea

NogDog
12-12-2007, 02:43 AM
I can't think of any reason why using a separate database would have any significant impact on performance. The main problems with high traffic would be the maximum simultaneous database connections (which will not be affected by using separate or single databases) and race conditions (which would be on a per table basis, not per database).