mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-394: Cover both main object ID and "start_date" columns with an index for sake of correlated MAX(start_date) history queries.
This commit is contained in:
@@ -502,6 +502,9 @@ CREATE NONCLUSTERED INDEX [IX_guacamole_connection_history_start_date]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IX_guacamole_connection_history_end_date]
|
||||
ON [guacamole_connection_history] ([end_date]);
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IX_guacamole_connection_history_connection_id_start_date]
|
||||
ON [guacamole_connection_history] ([connection_id], [start_date]);
|
||||
GO
|
||||
|
||||
--
|
||||
@@ -533,6 +536,9 @@ CREATE NONCLUSTERED INDEX [IX_guacamole_user_history_start_date]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IX_guacamole_user_history_end_date]
|
||||
ON [guacamole_user_history] ([end_date]);
|
||||
|
||||
CREATE NONCLUSTERED INDEX [IX_guacamole_user_history_user_id_start_date]
|
||||
ON [guacamole_user_history] ([user_id], [start_date]);
|
||||
GO
|
||||
|
||||
--
|
||||
|
Reference in New Issue
Block a user