mirror of
https://github.com/google/nomulus.git
synced 2025-07-23 19:20:44 +02:00
Add index for domainRepoId to PollMessage and DomainHistoryHost
This commit is contained in:
parent
2037611931
commit
5593a44802
4 changed files with 31 additions and 6 deletions
|
@ -91,11 +91,13 @@ public class DomainHistory extends HistoryEntry {
|
|||
@ElementCollection
|
||||
@JoinTable(
|
||||
name = "DomainHistoryHost",
|
||||
indexes =
|
||||
@Index(
|
||||
columnList =
|
||||
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
|
||||
unique = true))
|
||||
indexes = {
|
||||
@Index(columnList = "domain_history_domain_repo_id"),
|
||||
@Index(
|
||||
columnList =
|
||||
"domain_history_history_revision_id,domain_history_domain_repo_id,host_repo_id",
|
||||
unique = true)
|
||||
})
|
||||
@Column(name = "host_repo_id")
|
||||
Set<VKey<Host>> nsHosts;
|
||||
|
||||
|
|
|
@ -86,7 +86,12 @@ import org.joda.time.DateTime;
|
|||
@ExternalMessagingName("message")
|
||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||
@DiscriminatorColumn(name = "type")
|
||||
@Table(indexes = {@Index(columnList = "registrar_id"), @Index(columnList = "eventTime")})
|
||||
@Table(
|
||||
indexes = {
|
||||
@Index(columnList = "domainRepoId"),
|
||||
@Index(columnList = "registrar_id"),
|
||||
@Index(columnList = "eventTime")
|
||||
})
|
||||
public abstract class PollMessage extends ImmutableObject
|
||||
implements Buildable, TransferServerApproveEntity, UnsafeSerializable {
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
-- Copyright 2024 The Nomulus Authors. All Rights Reserved.
|
||||
--
|
||||
-- Licensed under the Apache License, Version 2.0 (the "License");
|
||||
-- you may not use this file except in compliance with the License.
|
||||
-- You may obtain a copy of the License at
|
||||
--
|
||||
-- http://www.apache.org/licenses/LICENSE-2.0
|
||||
--
|
||||
-- Unless required by applicable law or agreed to in writing, software
|
||||
-- distributed under the License is distributed on an "AS IS" BASIS,
|
||||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
-- See the License for the specific language governing permissions and
|
||||
-- limitations under the License.
|
||||
|
||||
CREATE INDEX CONCURRENTLY IDX69qun5kxt3eux5igrxrqcycv0 ON "DomainHistoryHost" (domain_history_domain_repo_id);
|
||||
CREATE INDEX CONCURRENTLY IDXf2q9dqj899h1q8lah5y719nxd ON "PollMessage" (domain_repo_id);
|
|
@ -848,6 +848,7 @@ create index IDXrh4xmrot9bd63o382ow9ltfig on "DomainHistory" (creation_time);
|
|||
create index IDXaro1omfuaxjwmotk3vo00trwm on "DomainHistory" (history_registrar_id);
|
||||
create index IDXsu1nam10cjes9keobapn5jvxj on "DomainHistory" (history_type);
|
||||
create index IDX6w3qbtgce93cal2orjg1tw7b7 on "DomainHistory" (history_modification_time);
|
||||
create index IDX69qun5kxt3eux5igrxrqcycv0 on "DomainHistoryHost" (domain_history_domain_repo_id);
|
||||
|
||||
alter table if exists "DomainHistoryHost"
|
||||
add constraint UKt2e7ae3t8gcsxd13wjx2ka7ij unique (domain_history_history_revision_id, domain_history_domain_repo_id, host_repo_id);
|
||||
|
@ -869,6 +870,7 @@ create index IDXkkwbwcwvrdkkqothkiye4jiff on "HostHistory" (host_name);
|
|||
create index IDXknk8gmj7s47q56cwpa6rmpt5l on "HostHistory" (history_type);
|
||||
create index IDX67qwkjtlq5q8dv6egtrtnhqi7 on "HostHistory" (history_modification_time);
|
||||
create index IDXlg6a5tp70nch9cp0gc11brc5o on "PackagePromotion" (token);
|
||||
create index IDXf2q9dqj899h1q8lah5y719nxd on "PollMessage" (domain_repo_id);
|
||||
create index IDXe7wu46c7wpvfmfnj4565abibp on "PollMessage" (registrar_id);
|
||||
create index IDXaydgox62uno9qx8cjlj5lauye on "PollMessage" (event_time);
|
||||
create index premiumlist_name_idx on "PremiumList" (name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue