-
I've fixed the issue by including a limit to the query and included separate query for MS SQL as it doesn't support parameters for @SELECT TOP@.
Change was cherry-picked to
origin/master
branch, however AMP schema will be extracted in 7.2.x (vide #4995) so it will be handled differently. -
Wojciech Kapcia wrote:
I've fixed the issue by including a limit to the query and included separate query for MS SQL as it doesn't support parameters for @SELECT TOP@.
Change was cherry-picked to
origin/master
branch, however AMP schema will be extracted in 7.2.x (vide #4995) so it will be handled differently.Ok, thank you, I saw the new query from mysql:
select * from msg_history where expired is not null order by expired limit 1000
so it will fix it
Type |
Bug
|
Priority |
Critical
|
Assignee | |
RedmineID |
4973
|
Version |
tigase-server-8.0.0
|
Spent time |
0
|
Issue Votes (0)
Watchers (0)
with the latest stable of 7.1.0 we are getting a lot of
the database is not overloaded, the problem is that the msg_history has about 220000 entries and if I look at "mysql processlist" I see a lot of:
"select * from msg_history where expired is not null order by expired "
why there is a select * without a limit? Is not possible to use limit or a cursor?
If the server has to read all the messages why it repeatly continue to read all the messages? Is not possible for future queries to use the last ID read or something like that to avoid to transfer each time on the wire all the data?
There is any quick hack from the config to increase the mysql timeout?