The main problem when querying a database is the response time. The research was of an applied type, using two databases: control and experimental. Three computers have been used to execute ten queries to the two databases, running 4 consecutive times and obtaining an average. The results found were that, of the ten consultations carried out, seven consultations obtained better results in the experimental DB and three in the control DB. It is concluded that the best practices to optimize a database are: to create clustered indexes on columns frequently used in searches or to perform sorts, create non-clustered indexes on primary or foreign keys that do not have clustered indexes, use calculated columns, operators, and listing of proper columns in queries, however, the use of indexes should be restricted because they affect insert, update, and delete operations.
Keywords: relational database, database optimization, SQL, indexing.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.