I think if the arc is 3-tier then this can be done in much optimized way that depends on your responsibility. If you are alone programmer then change No.1, No.2 and No.3, if not, then you can work by yourself at No.2 and No.3 level in better way.
I have noticed, this is one of the important concepts of SQL. Well, it is known that if we preallocate sequence numbers, the performance increases. What do you guys thinki about Preallocation of Sequence Numbers.
Query optimization is the most important aspect for database Optimization. As today clients are interested in fast data retrieval ::
There are two types of optimization.
1. One consist of logical optimization which generates a sequence of relational
algebra to solve the query.
2. In addition there is physical optimization which is used to determine the
means of carrying out each operation.
Also thought must be given in the direction of how to include tests and branching in your queries, how to normalize your database, and how to issue concurrent queries to boost performance, among many other design and optimization topics.
These Queries can be designed and built to optimize the performance. Query performance tuning and optimization can be accomplished through the following approaches:
1) Making decisions about of what type of query to use based on a consideration of data sources and the nature of the data you are querying.
2) Designing and Planning the type of query to use and how to implement it based on factors like expected query result size, memory requirements, and ability to leverage stored queries as appropriate.