Skip to content

Commit aa241d5

Browse files
committed
MOSIP-43917 | added missed index script
Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
1 parent 7f7c068 commit aa241d5

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

db_upgrade_scripts/mosip_ida/sql/1.2.1.2_to_1.3.0_rollback.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,12 @@ DROP INDEX IF EXISTS idx_cred_evt_pending;
257257
DROP INDEX CONCURRENTLY IF EXISTS idx_hotlist_idhash_idtype;
258258
DROP INDEX CONCURRENTLY IF EXISTS idx_hotlist_active;
259259
DROP INDEX IF EXISTS idx_otp_txn_ref_status_gen;
260+
DROP INDEX IF EXISTS ida.idx_auth_txn_entityid_request_dtimes_cover;
261+
DROP INDEX IF EXISTS ida.idx_job_exec_instance;
262+
DROP INDEX IF EXISTS ida.idx_step_exec_jobid_stepname;
263+
DROP INDEX IF EXISTS ida.encrypt_id;
264+
DROP INDEX IF EXISTS ida.idx_identity_cache_cr_dtimes;
265+
DROP INDEX IF EXISTS ida.idx_is_deleted;
266+
DROP INDEX IF EXISTS ida.idx_refid_generated;
267+
DROP INDEX IF EXISTS ida.idx_ual_token_auth_crd;
268+
DROP INDEX IF EXISTS ida.idx_uin_auth_lock_token_auth_crd_desc;

db_upgrade_scripts/mosip_ida/sql/1.2.1.2_to_1.3.0_upgrade.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ ON ida.hotlist_cache (id_hash, id_type);
150150
CREATE INDEX IF NOT EXISTS idx_hotlist_active
151151
ON ida.hotlist_cache (id_hash, id_type, status)
152152
WHERE status = 'Blocked';
153+
CREATE INDEX IF NOT EXISTS idx_auth_txn_entityid_request_dtimes_cover ON ida.auth_transaction USING btree (requested_entity_id, request_dtimes) INCLUDE (id);
154+
CREATE INDEX IF NOT EXISTS idx_job_exec_instance ON ida.batch_job_execution USING btree (job_instance_id);
155+
CREATE INDEX IF NOT EXISTS idx_step_exec_jobid_stepname ON ida.batch_step_execution USING btree (job_execution_id, step_name);
156+
CREATE INDEX IF NOT EXISTS encrypt_id ON ida.data_encrypt_keystore USING btree (id);
157+
CREATE INDEX IF NOT EXISTS idx_identity_cache_cr_dtimes ON ida.identity_cache USING btree (cr_dtimes);
158+
CREATE INDEX IF NOT EXISTS idx_is_deleted ON ida.otp_transaction USING btree (is_deleted);
159+
CREATE INDEX IF NOT EXISTS idx_refid_generated ON ida.otp_transaction USING btree (ref_id, generated_dtimes);
160+
CREATE INDEX IF NOT EXISTS idx_ual_token_auth_crd ON ida.uin_auth_lock USING btree (token_id, auth_type_code, cr_dtimes DESC)
161+
CREATE INDEX IF NOT EXISTS idx_uin_auth_lock_token_auth_crd_desc ON ida.uin_auth_lock USING btree (token_id, auth_type_code, cr_dtimes DESC) INCLUDE (status_code, unlock_expiry_datetime);
153162

154163
-- Optimize autovacuum for hotlist_cache to clean dead tuples
155164
ALTER TABLE hotlist_cache SET (

0 commit comments

Comments
 (0)