Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add index for last_contact in text_sessions table #2143

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

julien-nc
Copy link
Member

This will most likely improve this query:

public function findAllInactive() {
$qb = $this->db->getQueryBuilder();
$qb->select('id', 'color', 'document_id', 'last_contact', 'user_id', 'guest_name')
->from($this->getTableName())
->where($qb->expr()->lt('last_contact', $qb->createNamedParameter(time() - SessionService::SESSION_VALID_TIME)))
->execute();
return $this->findEntities($qb);
}

which is involved in the session cleanup job.

@julien-nc julien-nc force-pushed the enh/index-session-lastcontact branch from f256eaf to 1b2f8f8 Compare February 2, 2022 11:15
@julien-nc julien-nc force-pushed the enh/index-session-lastcontact branch from f97a6cf to b6a7554 Compare February 3, 2022 11:02
@julien-nc
Copy link
Member Author

Should we backport this to stable23, stable22 and stable21? If so I'll make them manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants