Improve performance of #__session with a large session count - New Index#22668
Closed
tonypartridge wants to merge 2 commits intojoomla:stagingfrom
Closed
Improve performance of #__session with a large session count - New Index#22668tonypartridge wants to merge 2 commits intojoomla:stagingfrom
tonypartridge wants to merge 2 commits intojoomla:stagingfrom
Conversation
This comment was marked as abuse.
This comment was marked as abuse.
Quy
reviewed
Oct 16, 2018
installation/sql/mysql/joomla.sql
Outdated
| KEY `userid` (`userid`), | ||
| KEY `time` (`time`) | ||
| KEY `time` (`time`), | ||
| KEY `client_guest` (`client_id`, `guest`); |
Contributor
|
don't forget postgresql , mssql |
Contributor
Author
@alikon I don't have a postgresql or mssql, or azuresql instance to test against, it's not 100% needed for those databases. This is just a PR against the mysql one to further improve performance. Feel free to submit a PR for those too as well. |
Contributor
|
The database schema should be consistent across platforms, including indexes. So if we're changing MySQL, the others should be changed at the same time. |
Contributor
Author
|
@mbabker so you want me to do the schemes without being able to test?
…On 17 Oct 2018, 16:53 +0100, Michael Babker ***@***.***>, wrote:
The database schema should be consistent across platforms, including indexes. So if we're changing MySQL, the others should be changed at the same time.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Contributor
|
@tonypartridge sorry, but unable to sumbit a pr to your branch |
Quy
reviewed
Jan 24, 2019
| KEY `userid` (`userid`), | ||
| KEY `time` (`time`) | ||
| KEY `time` (`time`), | ||
| KEY `client_guest` (`client_id`, `guest`) |
Contributor
There was a problem hiding this comment.
Change to client_id_guest to match with the other PR?
|
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22668 |
Contributor
|
Please test PR #23650 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22668. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #22632 .
Summary of Changes
Adds a new index 'client_guest' against client and guest columns
Testing Instructions
Have a large sessions table i.e. 14,000 rows. You can use a script I created to add these;
https://gist.github.com/tonypartridge/43c3d6f2f47d566fa8f7a28c9c4089a8
Expected result
as it is now but faster
Actual result
as it is now
Documentation Changes Required
The index will improve session query performance on MySQL databases. Omn average I am seeing a 30ms session query brought down to around 8ms saving 22ms.
Note, testing should be done on non-cached queries.