You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2022/08/06 12:47:40 UTC

[GitHub] [guacamole-client] necouchman commented on pull request #711: GUACAMOLE-1573: Slow selection of users on scale on Postgres

necouchman commented on PR #711:
URL: https://github.com/apache/guacamole-client/pull/711#issuecomment-1207208780

   While I generally lean toward using `JOIN` instead of nested queries in SQL, and I'm skeptical of situations like this, I _think_ this actually makes sense - it is pre-sorting and eliminating potentially a bunch of extra data from the `guacamole_user_history` table that then doesn't have to be `JOIN`ed to the data pulled out of the `guacamole_user` table.
   
   The only situation where I think this may end up being sub-optimal is if, for some reason, the data in the `guacamole_user_history` table is more fragmented or unsorted, and the `ORDER BY start_date DESC` and then `LIMIT 1` cost ends up high, but even in those situations it still may be lower cost than having to pull out all of the `guacamole_user_history` records and `JOIN`ing them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org