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

c++ - rosrun via ssh doesnt start a node properly -

android - questions about switching from C2DM to GCM -

How to resolve Delphi error: Incompatible types: 'PWideChar' and 'Pointer' -