1
다음 내부 검색 작업으로 구성된 다음 MySQL 쿼리가 있습니다. 그러나Mysql Inner Select Optimization
는SELECT
c.topicName as 'topicName',
c1 as 'sumOfWordsInTopic',
c.word,
c.wordCount,
c2/c1 AS 'wordProbability'
FROM weightallofwordsintopic as c
JOIN (
SELECT topicName, sum(wordCount) AS 'c1'
FROM weightallofwordsintopic group by topicName
) AS sub1 ON c.topicName = sub1.topicName
JOIN (
SELECT topicName,word, wordCount AS 'c2'
FROM weightallofwordsintopic
) AS sub2 ON c.topicName = sub2.topicName and c.word=sub2.word
1 내부 선택 wordCounts의 합을 취하고 번째는 wordcounts 및 그 외측 분할 인출 선택했습니다 .. 그 쿼리의 결과를 얻기 위해 느리게된다. 조금 더 빨리 만들 수있는 방법이 있습니까? 관심을 가져 주셔서 감사합니다.
관심을 가져 주셔서 감사합니다. – mstfky