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