blob: 8f87503f949193e8deeb17a50767c7d2579cdf95 [file] [log] [blame]
-- Gerrit 2 : Generic
--
-- Indexes to support @Query
--
-- *********************************************************************
-- AccountGroupMemberAccess
-- @PrimaryKey covers: byAccount
CREATE INDEX account_group_members_byGroup
ON account_group_members (group_id);
-- *********************************************************************
-- AccountGroupByIdAccess
-- @PrimaryKey covers: byGroup
CREATE INDEX account_group_id_byInclude
ON account_group_by_id (include_uuid);
-- *********************************************************************
-- ApprovalCategoryAccess
-- too small to bother indexing
-- *********************************************************************
-- ApprovalCategoryValueAccess
-- @PrimaryKey covers: byCategory
-- *********************************************************************
-- BranchAccess
-- @PrimaryKey covers: byProject
-- *********************************************************************
-- ChangeMessageAccess
-- @PrimaryKey covers: byChange
-- covers: byPatchSet
CREATE INDEX change_messages_byPatchset
ON change_messages (patchset_change_id, patchset_patch_set_id);
-- *********************************************************************
-- PatchLineCommentAccess
-- @PrimaryKey covers: published, draft
CREATE INDEX patch_comment_drafts
ON patch_comments (status, author_id);
-- *********************************************************************
-- PatchSetAccess
CREATE INDEX patch_sets_byRevision
ON patch_sets (revision);