Я пытаюсь создать индекс для нескольких столбцов в определенном столбце, но выполнение занимает много времени. Это из-за динамического создания или по какой-либо другой причине? Пожалуйста, дайте мне знать метод создания индекса по нескольким столбцам с использованием динамического SQL, который будет выполняться быстро.
Мой код:
exec('create index xlev on GenProductsAll_tmp(lev)')
exec('create index xelid on GenProductsAll_tmp(elid)')
exec('create index xotherarray on GenProductsAll_tmp(otherarray)')
exec('create index xArrayLev1 on GenProductsAll_tmp(ArrayLev1)')
exec('create index xArrayLev3 on GenProductsAll_tmp(ArrayLev3)')
exec('create index potherarray on GenProductsAll_tmp(pathotherarray)')
exec('create index pArrayLev1 on GenProductsAll_tmp(pathArrayLev1)')
exec('create index pArrayLev3 on GenProductsAll_tmp(pathArrayLev3)')