Who can help me? oracle query is slow-mysql tutorial

Source: Internet
Author: User
The problem is that news_data is a News table, news_type news type, news_image is a NEWS Image table, and a news may contain multiple images, only one image is required to correspond to one piece of news, and now there are many types of news by page. the query speed is slow and the query speed is low.

The problem is that news_data is a News table, news_type news type, news_image is a NEWS Image table, and a news may contain multiple images, only one image is required to correspond to one piece of news, and now there are many types of news by page. the query speed is slow and the query speed is low.

The problem is that news_data is a News table, news_type news type, news_image is a NEWS Image table, and a news may contain multiple images, only one picture is required to correspond to one piece of news, and there are many types of news by page. the query speed is slow due to the large amount of data, and the query speed is online ~~ Urgent <无>
select *from (select rownum rn,a.* from (select i.img_id,i.img_url,t.news_id,t.news_title,t.news_detail,t.news_date,t.match_type from news_data t left join (select x.img_id,x.news_id,x.img_url from news_image x where not exists(select 1 from news_image y where x.news_id = y.news_id and x.img_id > y.img_id)) i on t.news_id = i.news_id where t.news_type = 3 order by t.news_date desc) a where rownum <= 10 ) where rn > 0

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.