mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 12:07:51 +02:00
Add domainRepoId indexes to billing events (#1544)
The query analyzer identified this is a missing index on the BillingEvent table, and I added it for recurrences and cancellations as well as it's likely to be a problem for them too. "Give me all the billing events associated with a given domain by its repo ID" seems like a pretty common use case for the DB (and does appear to be used by our invoicing pipeline). This is a follow-up to PR #1545.
This commit is contained in:
parent
2e9aa8db2d
commit
d418008d27
2 changed files with 6 additions and 0 deletions
|
@ -308,6 +308,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "billingTime"),
|
||||
@javax.persistence.Index(columnList = "syntheticCreationTime"),
|
||||
@javax.persistence.Index(columnList = "domainRepoId"),
|
||||
@javax.persistence.Index(columnList = "allocationToken"),
|
||||
@javax.persistence.Index(columnList = "cancellation_matching_billing_recurrence_id")
|
||||
})
|
||||
|
@ -519,6 +520,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
indexes = {
|
||||
@javax.persistence.Index(columnList = "registrarId"),
|
||||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "domainRepoId"),
|
||||
@javax.persistence.Index(columnList = "recurrenceEndTime"),
|
||||
@javax.persistence.Index(columnList = "recurrence_time_of_year")
|
||||
})
|
||||
|
@ -615,6 +617,7 @@ public abstract class BillingEvent extends ImmutableObject
|
|||
indexes = {
|
||||
@javax.persistence.Index(columnList = "registrarId"),
|
||||
@javax.persistence.Index(columnList = "eventTime"),
|
||||
@javax.persistence.Index(columnList = "domainRepoId"),
|
||||
@javax.persistence.Index(columnList = "billingTime"),
|
||||
@javax.persistence.Index(columnList = "billing_event_id"),
|
||||
@javax.persistence.Index(columnList = "billing_recurrence_id")
|
||||
|
|
|
@ -761,6 +761,7 @@
|
|||
create index allocation_token_domain_name_idx on "AllocationToken" (domain_name);
|
||||
create index IDXih4b2tea127p5rb61gje6e1y2 on "BillingCancellation" (registrar_id);
|
||||
create index IDX2exdfbx6oiiwnhr8j6gjpqt2j on "BillingCancellation" (event_time);
|
||||
create index IDXl8vobbecsd32k4ksavdfx8st6 on "BillingCancellation" (domain_repo_id);
|
||||
create index IDXqa3g92jc17e8dtiaviy4fet4x on "BillingCancellation" (billing_time);
|
||||
create index IDX4ytbe5f3b39trsd4okx5ijhs4 on "BillingCancellation" (billing_event_id);
|
||||
create index IDXku0fopwyvd57ebo8bf0jg9xo2 on "BillingCancellation" (billing_recurrence_id);
|
||||
|
@ -768,10 +769,12 @@ create index IDXqspv57gj2led8ly42fq01t7m7 on "BillingEvent" (registrar_id);
|
|||
create index IDX5yfbr88439pxw0v3j86c74fp8 on "BillingEvent" (event_time);
|
||||
create index IDX6py6ocrab0ivr76srcd2okpnq on "BillingEvent" (billing_time);
|
||||
create index IDXplxf9v56p0wg8ws6qsvd082hk on "BillingEvent" (synthetic_creation_time);
|
||||
create index IDXbgfmveqa7e5hn689koikwn70r on "BillingEvent" (domain_repo_id);
|
||||
create index IDXcesda59ssop44kklytpb292hn on "BillingEvent" (allocation_token);
|
||||
create index IDX6ebt3nwk5ocvnremnhnlkl6ff on "BillingEvent" (cancellation_matching_billing_recurrence_id);
|
||||
create index IDXd3gxhkh0jk694pjvh9pyn7wjc on "BillingRecurrence" (registrar_id);
|
||||
create index IDX6syykou4nkc7hqa5p8r92cpch on "BillingRecurrence" (event_time);
|
||||
create index IDXoqttafcywwdn41um6kwlt0n8b on "BillingRecurrence" (domain_repo_id);
|
||||
create index IDXp3usbtvk0v1m14i5tdp4xnxgc on "BillingRecurrence" (recurrence_end_time);
|
||||
create index IDXjny8wuot75b5e6p38r47wdawu on "BillingRecurrence" (recurrence_time_of_year);
|
||||
create index IDX3y752kr9uh4kh6uig54vemx0l on "Contact" (creation_time);
|
||||
|
|
Loading…
Add table
Reference in a new issue