我已经写了下面的查询,但它需要时间,请任何人都可以重写查询以快速获得结果。 [英] I have written below query but it is taking time ,please any one can rewrite the query to get result fast.
本文介绍了我已经写了下面的查询,但它需要时间,请任何人都可以重写查询以快速获得结果。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我写了下面的查询,但是需要时间,请任何人都可以重写查询以快速获得结果。
我想删除帖子
解决方案
有几种方法可以提高sql查询的性能。请参阅:
http: //www.infoworld.com/article/2628420/database/7-performance-tips-for-faster-sql-queries.html [ ^ ]
http://www.developer.com/db/10-ways-to-improve -sql-query-performance.html [ ^ ]
第一眼看,减少WHERE中的子查询数量
语句可能有帮助。
您的查询充满子查询,甚至嵌套。
删除这些子查询并用LEFT JOIN替换它们(或INNER JOIN哪里更合适),这将有助于你...
I have written below query but it is taking time ,please any one can rewrite the query to get result fast.
I want to remove the post解决方案There is few ways to improve performance of sql query. See:
http://www.infoworld.com/article/2628420/database/7-performance-tips-for-faster-sql-queries.html[^]
http://www.developer.com/db/10-ways-to-improve-sql-query-performance.html[^]
At the first look, reducing the numbers of subqueries inWHERE
statement might help.
Your query full of sub-queries, even nested.
Remove those sub-queries and replace them with LEFT JOIN (or INNER JOIN where fits better), that will help you...
这篇关于我已经写了下面的查询,但它需要时间,请任何人都可以重写查询以快速获得结果。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文