-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added indexes for public_api_daily_limit table (#7140)
* Added indexes for public_api_daily_limit table * Added the composite index for client_id ip_address and request_date * fixed formatting * added the indexes concurrently via liquibase * Created separate changesets per index * Added the dbms postgres
- Loading branch information
1 parent
090b7b0
commit d8ca3a5
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
orcid-persistence/src/main/resources/db/updates/add_public_api_daily_rate_limit_indexes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |