CodePudding user response:
1. The first determine what is the use of SQL, if it is run out of the group of statements to use, can consider to the SQL apart,2. If the SQL is very long, can't open it, then can query conditions field see index, index can't literally, if the condition field cannot add index, and discuss business impose an indexed field as query condition,
3. The optimization of query of sal statements, including but not limited to: query mode, the link between the tables, associated field index, associative table less as far as possible, and so on,
4. Consider giving table partition or table,
5. If the query conditions field failure can consider to add index, index
6. Parallel execution of SQL, the resource consuming, careful,
Please review, thank you,