Assuming I have a table in Azure SQL DB with a million rows. What are the ways I can optimize the table for performing queries using WHERE clause. Column 1 is for the id which is the primary key. Column 2 to 5 is for addresses (St, city, state, zip) and columns 6 to 8 are digits.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Look into indexes. If you are going to search by address, add an index on address fields. If most searches are by zip code, add an index on that field. For more info on indexes have a look at this document Index Table