My phpbb 3.1. is suffering slowness due to session table.
I need someone who can optimized the query
SELECT u.*, s.session_time, s.session_viewonline, s.session_start, s.session_page, session_forum_id
FROM phpbb_users u
LEFT JOIN (
SELECT u.user_id, MAX(s.session_time) as session_time, MIN(s.session_viewonline) AS session_viewonline, session_start, session_page, session_forum_id
FROM phpbb_users AS u
LEFT JOIN phpbb_sessions AS s ON u.user_id = s.session_user_id
WHERE u.user_id = '1'
group by u.user_id, session_start, session_page, session_forum_id
) s on u.user_id = s.user_id
WHERE u.user_id = '1'
ORDER BY session_time DESC\G
Please only very professional and expert. Thanks
Hello!
This is something you wrote or some extension? Because if it was you then I have some questions to assess what's the actual aim(desired outcome) of it. It does look like some core queries of phpbb but not in any of the native forms, so I can't immediately recognize it.
In any case I can work on this as soon as you move forward with the project.
Kind Regards,
Dobri
PS: None db server like joins on itself(one and the same table being on left and right side of the join), and this compound SQL statement does that not once but two times in one query, so it's a wonder it gets to run at all.
$30 USD in 0 day
4.8 (73 reviews)
5.5
5.5
4 freelancers are bidding on average $96 USD for this job
Hi,
The project details are cleared and I am up for it to begin it right away. Please revert back in order to chat further.
Allow me a chance to work on your project and I assure you that I won't let you down.
Note : Pay only if results are provided else don't pay.
Thanks