A database index is a data structure that improves the speed of operations on a database table. Indices can be created using one or more columns of a database table, providing the basis for both rapid random lookups and efficient access of ordered records. -Wikipedia So, why are indexes important? As the definition above states, they speed up operations on a table, but that doesn't really drive the point home. Without a proper index, anytime you write an SQL query the database engine must do a scan through every single row of your table looking for items that match your search criteria. While a full table scan may not take long on a table with a couple of thousand rows, once your tables grow beyond that point a proper index can speed up your selects by an order of magnitude of 100x or more. Right, so how do indexes accomplish...
[read full story]