Hi @ all,
I have a big problem with the performance of one of my queries.
The performance of the following query is very low:
Select * from RankingPassthroughs
Inner Join KeywordPassthroughs on RankingPassthroughs.Id = KeywordPassthroughs.RankingPassthroughId
Inner Join KeywordPassthroughRankings on KeywordPassthroughRankings.PassthroughId = KeywordPassthroughs.Id
Inner Join Keywords on KeywordPassthroughs.KeywordId = Keywords.Id
Inner Join KeywordRankingsUrls on KeywordPassthroughRankings.UrlId = KeywordRankingsUrls.Id
where KeywordPassthroughRankings.DomainId = 88
But if I reduce the query to
Select * from RankingPassthroughs
Inner Join KeywordPassthroughs on RankingPassthroughs.Id = KeywordPassthroughs.RankingPassthroughId
Inner Join KeywordPassthroughRankings on KeywordPassthroughRankings.PassthroughId = KeywordPassthroughs.Id
Inner Join Keywords on KeywordPassthroughs.KeywordId = Keywords.Id
where KeywordPassthroughRankings.DomainId = 88
or
Select * from RankingPassthroughs
Inner Join KeywordPassthroughs on RankingPassthroughs.Id = KeywordPassthroughs.RankingPassthroughId
Inner Join KeywordPassthroughRankings on KeywordPassthroughRankings.PassthroughId = KeywordPassthroughs.Id
Inner Join KeywordRankingsUrls on KeywordPassthroughRankings.UrlId = KeywordRankingsUrls.Id
where KeywordPassthroughRankings.DomainId = 88
the performance is perfect.
What's wrong with the first query?
Thank you!