SQL INSERT and UPDATE queries run far to slow
Database Indexes are a major benefit to performance of queries.  I work almost exclusively with Microsoft SQL Server, but the principles apply on pretty much all flavors of SQL servers.

Because the indexes are smaller than the overall table and have the needed value to be searched in a sorted order, creating indexes (to a reasonable degree) is the quickest way to speed up queries.  

You can overdo it, of course, since too many indexes can drag down performance.