/**Begin D:\PDM_UPGRADE\PDM1\HRSS_constraint.sql **/

 EXEC P_ALTERPK 'PK_HRSS_USERSEARCHLOG', 'T_HRSS_USERSEARCHLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRSS_USERSEARCHLOG' AND KSQL_INDNAME = 'IDX_HRSS_USERSEARCHLOG') CREATE INDEX IDX_HRSS_USERSEARCHLOG ON T_HRSS_USERSEARCHLOG ( FUSERID ,FSEARCHSCENEID ,FSEARCHPAGEID ,FSEARCHKEY );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRSS_USERSEARCHLOG' AND KSQL_INDNAME = 'IDX_HRSS_USERSEARCHLOG_TIME') CREATE INDEX IDX_HRSS_USERSEARCHLOG_TIME ON T_HRSS_USERSEARCHLOG ( FSEARCHTIME );


 EXEC P_ALTERPK 'PK_HRSS_USERLASTSEARCHKEY', 'T_HRSS_USERLASTSEARCHKEY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRSS_USERLASTSEARCHKEY' AND KSQL_INDNAME = 'IDX_HRSS_USERLASTSEARCHKEY') CREATE INDEX IDX_HRSS_USERLASTSEARCHKEY ON T_HRSS_USERLASTSEARCHKEY ( FUSERID ,FSEARCHSCENEID ,FSEARCHPAGEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_HRSS_USERLASTSEARCHKEY' AND KSQL_INDNAME = 'IDX_HRSS_USERLASTSEARCHKEYTIME') CREATE INDEX IDX_HRSS_USERLASTSEARCHKEYTIME ON T_HRSS_USERLASTSEARCHKEY ( FSEARCHTIME );



/**End D:\PDM_UPGRADE\PDM1\HRSS_constraint.sql **/
