Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added indexes for public_api_daily_limit table #7140

Merged
merged 7 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -406,4 +406,5 @@
<include file="/db/updates/add_unique_constraint_external_id_disambiguated_org.xml" />
<include file="/db/updates/add_date_verified_to_email.xml" />
<include file="/db/updates/create_public_api_daily_rate_limit.xml" />
<include file="/db/updates/add_public_api_daily_rate_limit_indexes.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd">

<changeSet id="ADD-PAPI-LIMIT-INDEXES-IP-ADDRESS" author="Camelia Dumitru" runInTransaction="false" dbms="postgresql">
<sql>create index concurrently if not exists idx_ip_address on public_api_daily_rate_limit(ip_address);</sql>
</changeSet>
<changeSet id="ADD-PAPI-LIMIT-INDEXES-CLIENT-ID" author="Camelia Dumitru" runInTransaction="false" dbms="postgresql">
<sql>create index concurrently if not exists idx_client_id on public_api_daily_rate_limit(client_id);</sql>
</changeSet>
<changeSet id="ADD-PAPI-LIMIT-INDEXES-REQUEST-DATE" author="Camelia Dumitru" runInTransaction="false" dbms="postgresql">
<sql>create index concurrently if not exists idx_request_date on public_api_daily_rate_limit(request_date);</sql>
</changeSet>
<changeSet id="ADD-PAPI-LIMIT-INDEXES-COMPOSITE" author="Camelia Dumitru" runInTransaction="false" dbms="postgresql">
<sql>create index concurrently if not exists idx_client_ip_date on public_api_daily_rate_limit(client_id, ip_address, request_date);</sql>
</changeSet>

</databaseChangeLog>