Not experience or technical guidance, just be careful with what you are currently doing Index is the most important thing to speed up big data queries. Therefore, many problems are caused by indexes. The primary key is indispensable, and the query and sorting by the primary key are the fastest. Other non-clustered indexes or composite indexes created as needed Table Structure Design is particularly important, so indexes cannot be invalidated. 1 blank fields will invalidate the index 2. process the values in the field (substring (catecode, 1000) =). Only the entire field takes effect as the index of the query and comparison condition. 3. If multiple values in the index fields are separated by delimiters, the index will also become invalid. 4 like % d % index will also be invalid 5. Note that the in efficiency is extremely low in the query efficiency of big data tables and should be used as little as possible. 6. A table that is associated with a large data volume is also a word that is slow. You would rather create several more fields than join. 7. Try to use the int type for identification, which is more efficient than text query. 8 For read-only, read only in forward mode as far as possible 9. Exercise caution when using count (CPU consumption) for big data statistics and classified statistics) 10. You can use the view to replace the SQL statement on the page. This is executed in the memory. After all, the current server configuration is not very bad. 11 in SQL user-defined functions, the query of large data tables and Big Data paging should be used less. The query results should be read Based on pagesize. Do not submit records at one time, if tens of thousands of queries are proposed at a time, they are generally slow. If the number of queries exceeds several hundred thousand or millions, the query will fail. The query efficiency will be faster after the conditions are filtered by layer. n more 12. Note that the length of a field can be set as long as it is actually needed. Do not set it as needed. 13. output as few as thousands or tens of thousands of text fields at a time 14. What to read? 15. The record set and database connection object are on and off Sorting is the most time-consuming in 16 big data, so index creation of sorting fields is the most important
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.