How to optimize query when join on varchar column in Sql Server -


i have 2 tables , b

select      a.id, b.name       inner join      b on a.name = b.name 

how optimize query? name column varchar(8)

you should create index on both tables , b

create index index_name on table_name (column_name) 

http://www.w3schools.com/sql/sql_create_index.asp


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -