ANSWERS: 1
  • You can create indexes with (drumroll...) the CREATE INDEX command. It's easy to find the syntax in SQL Server books online. You can also create indices when you create the table, if you like. Indexes improve searches by dramatically increasing the speed by which search criteria can be matched against the records. Basically, if you have a table that has multiple columns, only one of those columns can be the primary key -- that's the column used to order the physical records in the database. If you want to search the table by anything *other* than the primary key, the DB must scan every record to locate matches. These "table scans" are very slow compared to an index lookup. To solve that, you create indices, the indices are ordered so that the DB can use more efficient search algorithms to locate records in the table.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy