Database Performance Tuning MUST Read
Database Performance Tuning Query Run Time A database is also a software and is subject to the same limitations as all software, it can only process as much information as its hardware is capable of handling. The way to make a query run faster is to reduce the number of calculations that the software (and therefore hardware) must perform. To do this, you will need some understanding of how SQL actually makes calculations. Table size: If your query hits one or more tables with millions of rows or more, it could affect performance. Joins: If your query joins two tables in a way that substantially increases the row count of the result set, your query is likely to be slow. Aggregations: Combining multiple rows to produce a result requires more computation than simply retrieving those rows. Other users running queries: This is something you probably can’t control. The more queries running concurrently on a dat...