[ 
https://issues.apache.org/jira/browse/RANGER-2529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16903623#comment-16903623
 ] 

Pradeep Agrawal commented on RANGER-2529:
-----------------------------------------

Note : If there are too many records in the x_data_hist table then in the 
ranger upgrade case this patch may take time. To avoid the upgrade failure user 
can create the index outside of the ranger install script.

To create the index use the below sql statement as per your ranger DB flavor.

*MYSQL:* 

ALTER TABLE x_data_hist ADD INDEX x_data_hist_idx_objid_objclstype(obj_id, 
obj_class_type);

*ORACLE:*

CREATE INDEX x_data_hist_idx_objid_clstype ON x_data_hist(obj_id, 
obj_class_type)

*POSTGRES:*

CREATE INDEX x_data_hist_idx_objid_objclstype ON 
x_data_hist(obj_id,obj_class_type);

*SQLSERVER:*

CREATE NONCLUSTERED INDEX [x_data_hist_idx_objid_objclstype] ON 
[x_data_hist]([obj_id] ASC, [obj_class_type] ASC)WITH (SORT_IN_TEMPDB = OFF, 
DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF) ON [PRIMARY];

*SQLANYWHERE:*

CREATE NONCLUSTERED INDEX x_data_hist_idx_objid_objclstype ON 
dbo.x_data_hist(obj_id ASC, obj_class_type ASC);

 

 

> Create index on obj_id and obj_class_type column of x_data_hist table
> ---------------------------------------------------------------------
>
>                 Key: RANGER-2529
>                 URL: https://issues.apache.org/jira/browse/RANGER-2529
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 2.0.0
>            Reporter: Pradeep Agrawal
>            Assignee: Pradeep Agrawal
>            Priority: Major
>             Fix For: 2.1.0
>
>         Attachments: 
> 0001-RANGER-2529-Create-index-on-obj_id-and-obj_class_typ.patch
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to