﻿DROP INDEX IF EXISTS T_KKTANITOVEZGETTSEG.NCI_KKTANITOVEZGETTSEG_AlkalmazottId_IntezmenyId
CREATE INDEX NCI_KKTanitoVezgettseg_AlkalmazottId_IntezmenyId 
	ON T_KKTANITOVEZGETTSEG (
		 C_ALKALMAZOTTID
		,C_INTEZMENYID
	)
	INCLUDE (C_KKTANIOTOMUVTERTIPUSID,TOROLT,LASTCHANGED,MODIFIER,ELOZOTANEVIREKORDID)
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKTANITOVEZGETTSEG.NCI_KKTanitoVezgettseg_ElozotanevirekordId
CREATE INDEX NCI_KKTanitoVezgettseg_ElozotanevirekordId
	ON T_KKTANITOVEZGETTSEG (
		ELOZOTANEVIREKORDID
	)
	INCLUDE (C_INTEZMENYID)
	WITH (FILLFACTOR = 80)


DROP INDEX IF EXISTS T_KKAMIVEGZETTSEG.NCI_KKAmiVegzettseg_AlkalmazottId_IntezmenyId
CREATE INDEX NCI_KKAmiVegzettseg_AlkalmazottId_IntezmenyId
	ON T_KKAMIVEGZETTSEG (
		  C_ALKALMAZOTTID
		 ,C_INTEZMENYID
	)
	INCLUDE (ELOZOTANEVIREKORDID)
	WHERE TOROLT='F'
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKELEKTROAKUZENE.NCI_KKElektroAkuZene_KKAmiVegzettsegId_IntezmenyId
CREATE INDEX NCI_KKElektroAkuZene_KKAmiVegzettsegId_IntezmenyId
	ON T_KKELEKTROAKUZENE (
		 C_KKAMIVEGZETTSEGID
		,C_INTEZMENYID
	)
	INCLUDE (ELOZOTANEVIREKORDID,C_ELEKTRAKUTIPUSID,LASTCHANGED,MODIFIER)
	WHERE TOROLT='F'
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKELEKTROAKUZENE.NCI_KKElektroAkuZene_ELOZOTANEVIREKORDID
CREATE INDEX NCI_KKElektroAkuZene_ELOZOTANEVIREKORDID
	ON T_KKELEKTROAKUZENE (
		  ELOZOTANEVIREKORDID
	)
	INCLUDE (C_INTEZMENYID)
	WITH (FILLFACTOR = 80)
	
DROP INDEX IF EXISTS T_KKTANTARGYKATEGORIA.NCI_KKTantargyKategoria_KKTanarVegzettsegId_IntezmenyId
CREATE INDEX NCI_KKTantargyKategoria_KKTanarVegzettsegId_IntezmenyId
	ON T_KKTANTARGYKATEGORIA (
		  C_KKTANARVEGZETTSEGID
		 ,C_INTEZMENYID
	)
	INCLUDE(C_KKSZAKTIPUSID,TOROLT,SERIAL,ELOZOTANEVIREKORDID,LASTCHANGED,MODIFIER)
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKTANTARGYKATEGORIA.NCI_KKTantargyKategoria_IntezmenyId_ElozotaneviRekordId
CREATE INDEX NCI_KKTantargyKategoria_IntezmenyId_ElozotaneviRekordId
  ON T_KKTANTARGYKATEGORIA (
      C_KKTANARVEGZETTSEGID
	 ,C_INTEZMENYID
  )
  INCLUDE (C_KKSZAKTIPUSID,TOROLT,SERIAL,LASTCHANGED,MODIFIER)
  WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKTANARVEGZETTSEG.NCI_KKTanarVegzettseg_IntezmenyId_AlkalmazottId
CREATE INDEX NCI_KKTanarVegzettseg_IntezmenyId_AlkalmazottId 
    ON T_KKTANARVEGZETTSEG (
       C_ALKALMAZOTTID
      ,C_INTEZMENYID
	)
	WHERE TOROLT='F'
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKTANARVEGZETTSEG.NCI_KKTanarVegzettseg_IntezmenyId_ElozoTaneviRekordid
CREATE INDEX NCI_KKTanarVegzettseg_IntezmenyId_ElozoTaneviRekordid
    ON T_KKTANARVEGZETTSEG (
        ELOZOTANEVIREKORDID
       ,C_INTEZMENYID
	)
	INCLUDE (C_KKTANARVEGZETTSEGID,TOROLT,SERIAL,LASTCHANGED,MODIFIER)
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKGYOGYPEDVEGZETTSEG.NCI_KKGyogypedVegzettseg_IntezmenyId
CREATE INDEX NCI_KKGyogypedVegzettseg_IntezmenyId
    ON T_KKGYOGYPEDVEGZETTSEG (
        C_INTEZMENYID
	)
	INCLUDE (ELOZOTANEVIREKORDID,TOROLT,SERIAL,LASTCHANGED,MODIFIER)
	WITH (FILLFACTOR = 80)

DROP INDEX IF EXISTS T_KKTANTARGYKATEGORIA.NCI_KKTantargyKategoria_IntezmenyId_ElozotaneviRekordId
CREATE INDEX NCI_KKTantargyKategoria_IntezmenyId_ElozotaneviRekordId
  ON T_KKTANTARGYKATEGORIA (
     C_INTEZMENYID
    ,ELOZOTANEVIREKORDID
  )
  INCLUDE (C_KKSZAKTIPUSID,TOROLT,SERIAL,LASTCHANGED,MODIFIER)
  WITH (FILLFACTOR = 80)
