For building faster SQL queries, follow these hints.
Always try to delete data or update data in smaller batches. If you try to delete thousands of records in one go, it will impact performance. If you try to update large batches of data in one go, it will also negatively impact performance and speed. Break these up in smaller chunks.
By using triggers, you may end up locking more than one table at the same time, until the trigger has completed its work. Sometimes a trigger is unavoidable, but only sometimes. Rather, try to split the logic so that only limited resources are locked at a given time.
As the name implies, nested views are views inside existing views. The more nested a view becomes, the more data has to be returned for a single query and this can really cause your whole database to lag quite quickly. Do not nest views.
© 2021 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.