怎么办MAX_JOIN_SIZE?

时间:2017-10-18 17:02:11

标签: php mysql sql

$sqler = "SELECT artist.ArtistID, artist.ArtistName, artist.RegionID, artist_genre.ArtistID, artist_genre.GenreID, artist.Zip, artist.ImagePath, artist_video.ArtistID, artist_mentions.ArtistID, artist_press.ArtistID, artist_music.ArtistID 
FROM artist, artist_genre, artist_video, artist_mentions, artist_press, artist_music 
WHERE artist.RegionID IN($areaer) AND artist_genre.GenreID IN($genrer) AND artist.ArtistID = artist_genre.ArtistID $musik $video $omtale $presse GROUP BY artist.artistID";

当我尝试运行此查询时没有任何事情发生,所以我在mysql中测试它,我得到错误MAX_JOIN_SIZE,表示我必须设置SQL_BIG_SELECTS = 1,但这并没有改变任何东西。我是SQL的新手,我认为mabye我可以优化我的查询,但我不知道从哪里开始。加入表会帮助运行查询更轻吗?

0 个答案:

没有答案