Lack of interest [Suggestion] LIMIT to Session Query

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

DregondRahl

Member
Sessions can get quite large for an active community, so it would appropriate i think to add LIMIT 1 to the session query, so it stops searching after it find the one its looking for.

Code:
SELECT session_data, expiry_date
FROM xf_session
WHERE session_id = ?
LIMIT 1

Its not a major change but for a lot of sessions it can have some improvement.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
LIMIT works by doing the query, then extracting a collection of results.

When the query can only return a single result, by virtue of {unique_key} = {value}, then adding a LIMIT clause could not have any effect whatsoever.
 
Top Bottom